diff options
Diffstat (limited to 'samples/OpenIdRelyingPartyWebForms/Global.asax.cs')
-rw-r--r-- | samples/OpenIdRelyingPartyWebForms/Global.asax.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/samples/OpenIdRelyingPartyWebForms/Global.asax.cs b/samples/OpenIdRelyingPartyWebForms/Global.asax.cs index ac74853..6583289 100644 --- a/samples/OpenIdRelyingPartyWebForms/Global.asax.cs +++ b/samples/OpenIdRelyingPartyWebForms/Global.asax.cs @@ -42,6 +42,20 @@ } } + 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) { |