diff options
Diffstat (limited to 'samples/OpenIdRelyingPartyWebForms/Global.asax.cs')
-rw-r--r-- | samples/OpenIdRelyingPartyWebForms/Global.asax.cs | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/samples/OpenIdRelyingPartyWebForms/Global.asax.cs b/samples/OpenIdRelyingPartyWebForms/Global.asax.cs index 6283987..8460d49 100644 --- a/samples/OpenIdRelyingPartyWebForms/Global.asax.cs +++ b/samples/OpenIdRelyingPartyWebForms/Global.asax.cs @@ -18,7 +18,7 @@ get { var googleWebConsumer = (WebConsumerOpenIdRelyingParty)HttpContext.Current.Application["GoogleWebConsumer"]; if (googleWebConsumer == null) { - googleWebConsumer = new WebConsumerOpenIdRelyingParty(GoogleConsumer.ServiceDescription, GoogleTokenManager); + googleWebConsumer = new WebConsumerOpenIdRelyingParty { ServiceProvider = GoogleConsumer.ServiceDescription }; HttpContext.Current.Application["GoogleWebConsumer"] = googleWebConsumer; } @@ -26,36 +26,6 @@ } } - internal static InMemoryTokenManager GoogleTokenManager { - get { - var tokenManager = (InMemoryTokenManager)HttpContext.Current.Application["GoogleTokenManager"]; - if (tokenManager == null) { - string consumerKey = ConfigurationManager.AppSettings["googleConsumerKey"]; - string consumerSecret = ConfigurationManager.AppSettings["googleConsumerSecret"]; - if (!string.IsNullOrEmpty(consumerKey)) { - tokenManager = new InMemoryTokenManager(consumerKey, consumerSecret); - HttpContext.Current.Application["GoogleTokenManager"] = tokenManager; - } - } - - return tokenManager; - } - } - - internal static InMemoryTokenManager OwnSampleOPHybridTokenManager { - get { - var tokenManager = (InMemoryTokenManager)HttpContext.Current.Application["OwnSampleOPHybridTokenManager"]; - if (tokenManager == null) { - string consumerKey = new Uri(HttpContext.Current.Request.Url, HttpContext.Current.Request.ApplicationPath).AbsoluteUri; - string consumerSecret = "some crazy secret"; - tokenManager = new InMemoryTokenManager(consumerKey, consumerSecret); - HttpContext.Current.Application["OwnSampleOPHybridTokenManager"] = tokenManager; - } - - return tokenManager; - } - } - public static string ToString(NameValueCollection collection) { using (StringWriter sw = new StringWriter()) { foreach (string key in collection.Keys) { |