diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-22 10:15:49 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-22 10:15:49 -0700 |
commit | 4d2ec520fe9b42d0d0f1b764029a33dab906e68a (patch) | |
tree | 17918d5b1c4580017d0cb2c6e6ddd8153cdadcfa /samples/OAuthServiceProvider/Code/Global.cs | |
parent | 431bf8c104dd498d1894083fc2ed4fa795bba7df (diff) | |
download | DotNetOpenAuth-4d2ec520fe9b42d0d0f1b764029a33dab906e68a.zip DotNetOpenAuth-4d2ec520fe9b42d0d0f1b764029a33dab906e68a.tar.gz DotNetOpenAuth-4d2ec520fe9b42d0d0f1b764029a33dab906e68a.tar.bz2 |
Stripping OAuth 1.0 support from the OAuthServiceProvider sample.
Diffstat (limited to 'samples/OAuthServiceProvider/Code/Global.cs')
-rw-r--r-- | samples/OAuthServiceProvider/Code/Global.cs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/samples/OAuthServiceProvider/Code/Global.cs b/samples/OAuthServiceProvider/Code/Global.cs index 7c2e9f7..bcfa8ae 100644 --- a/samples/OAuthServiceProvider/Code/Global.cs +++ b/samples/OAuthServiceProvider/Code/Global.cs @@ -4,7 +4,6 @@ using System.ServiceModel; using System.Text; using System.Web; - using DotNetOpenAuth.OAuth.Messages; using DotNetOpenAuth.OAuth2; using DotNetOpenAuth.OAuth2.Messages; @@ -41,19 +40,12 @@ } } - public static DatabaseTokenManager TokenManager { get; set; } - public static DatabaseNonceStore NonceStore { get; set; } public static User LoggedInUser { get { return Global.DataContext.Users.SingleOrDefault(user => user.OpenIDClaimedIdentifier == HttpContext.Current.User.Identity.Name); } } - public static UserAuthorizationRequest PendingOAuthAuthorization { - get { return HttpContext.Current.Session["authrequest"] as UserAuthorizationRequest; } - set { HttpContext.Current.Session["authrequest"] = value; } - } - public static EndUserAuthorizationRequest PendingOAuth2Authorization { get { return HttpContext.Current.Session["authrequest"] as EndUserAuthorizationRequest; } @@ -87,12 +79,6 @@ } } - public static void AuthorizePendingRequestToken() { - ITokenContainingMessage tokenMessage = PendingOAuthAuthorization; - TokenManager.AuthorizeRequestToken(tokenMessage.Token, LoggedInUser); - PendingOAuthAuthorization = null; - } - private static void CommitAndCloseDatabaseIfNecessary() { var dataContext = dataContextSimple; if (dataContext != null) { @@ -110,11 +96,6 @@ appPath += "/"; } - // This will break in IIS Integrated Pipeline mode, since applications - // start before the first incoming request context is available. - // TODO: fix this. - Constants.WebRootUrl = new Uri(HttpContext.Current.Request.Url, appPath); - Global.TokenManager = new DatabaseTokenManager(); Global.NonceStore = new DatabaseNonceStore(); } |