summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdRelyingPartyWebForms/Code
diff options
context:
space:
mode:
Diffstat (limited to 'samples/OpenIdRelyingPartyWebForms/Code')
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Code/State.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/samples/OpenIdRelyingPartyWebForms/Code/State.cs b/samples/OpenIdRelyingPartyWebForms/Code/State.cs
index c8147e5..c8cef80 100644
--- a/samples/OpenIdRelyingPartyWebForms/Code/State.cs
+++ b/samples/OpenIdRelyingPartyWebForms/Code/State.cs
@@ -1,5 +1,6 @@
namespace OpenIdRelyingPartyWebForms {
using System.Web;
+ using DotNetOpenAuth.OAuth;
using DotNetOpenAuth.OpenId.Extensions.AttributeExchange;
using DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy;
using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration;
@@ -28,8 +29,8 @@ namespace OpenIdRelyingPartyWebForms {
set { HttpContext.Current.Session["PapePolicies"] = value; }
}
- public static string GoogleAccessToken {
- get { return HttpContext.Current.Session["GoogleAccessToken"] as string; }
+ public static AccessToken GoogleAccessToken {
+ get { return (AccessToken)(HttpContext.Current.Session["GoogleAccessToken"] ?? new AccessToken()); }
set { HttpContext.Current.Session["GoogleAccessToken"] = value; }
}
@@ -38,7 +39,7 @@ namespace OpenIdRelyingPartyWebForms {
FetchResponse = null;
FriendlyLoginName = null;
PapePolicies = null;
- GoogleAccessToken = null;
+ GoogleAccessToken = new AccessToken();
}
}
} \ No newline at end of file