diff options
author | David Christiansen <coding@davedoes.net> | 2012-03-15 22:10:55 +0000 |
---|---|---|
committer | David Christiansen <coding@davedoes.net> | 2012-03-15 22:10:55 +0000 |
commit | a5bfa2bb8a614b1932ec8b7bbc6a0cc6bca3051f (patch) | |
tree | a3057157fa3287e0c0c4cc49be1854f9aa63d321 /src/OpenID/OpenIdRelyingPartyWebForms/Code/State.cs | |
parent | 02ce959db12fec57e846e5ebfa662cd0327ce69c (diff) | |
download | DotNetOpenAuth.Samples-a5bfa2bb8a614b1932ec8b7bbc6a0cc6bca3051f.zip DotNetOpenAuth.Samples-a5bfa2bb8a614b1932ec8b7bbc6a0cc6bca3051f.tar.gz DotNetOpenAuth.Samples-a5bfa2bb8a614b1932ec8b7bbc6a0cc6bca3051f.tar.bz2 |
W.I.P.
* Initial migration and reference to DNOA Nuget packages (From teamcity.dotnetopenauth.net)
* Awaiting fix to DotNetOpenAuth.OpenIdOAuth.nuspec in order to complete migration.
Diffstat (limited to 'src/OpenID/OpenIdRelyingPartyWebForms/Code/State.cs')
-rw-r--r-- | src/OpenID/OpenIdRelyingPartyWebForms/Code/State.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/OpenID/OpenIdRelyingPartyWebForms/Code/State.cs b/src/OpenID/OpenIdRelyingPartyWebForms/Code/State.cs new file mode 100644 index 0000000..c8147e5 --- /dev/null +++ b/src/OpenID/OpenIdRelyingPartyWebForms/Code/State.cs @@ -0,0 +1,44 @@ +namespace OpenIdRelyingPartyWebForms { + using System.Web; + using DotNetOpenAuth.OpenId.Extensions.AttributeExchange; + using DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy; + using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration; + + /// <summary> + /// Strong-typed bag of session state. + /// </summary> + public class State { + public static ClaimsResponse ProfileFields { + get { return HttpContext.Current.Session["ProfileFields"] as ClaimsResponse; } + set { HttpContext.Current.Session["ProfileFields"] = value; } + } + + public static FetchResponse FetchResponse { + get { return HttpContext.Current.Session["FetchResponse"] as FetchResponse; } + set { HttpContext.Current.Session["FetchResponse"] = value; } + } + + public static string FriendlyLoginName { + get { return HttpContext.Current.Session["FriendlyUsername"] as string; } + set { HttpContext.Current.Session["FriendlyUsername"] = value; } + } + + public static PolicyResponse PapePolicies { + get { return HttpContext.Current.Session["PapePolicies"] as PolicyResponse; } + set { HttpContext.Current.Session["PapePolicies"] = value; } + } + + public static string GoogleAccessToken { + get { return HttpContext.Current.Session["GoogleAccessToken"] as string; } + set { HttpContext.Current.Session["GoogleAccessToken"] = value; } + } + + public static void Clear() { + ProfileFields = null; + FetchResponse = null; + FriendlyLoginName = null; + PapePolicies = null; + GoogleAccessToken = null; + } + } +}
\ No newline at end of file |