diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-01-31 21:32:01 -0800 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2009-01-31 21:32:01 -0800 |
commit | e865ec7da293496d6c2e67039b86c4ef9ded5a6c (patch) | |
tree | 116d6a4e8c0892d2be13acd31bacae004de4bb8b /samples/RelyingPartyWebForms/Code/State.cs | |
parent | f6d5493a42d07389421763c2f1da35b4ca7d9f45 (diff) | |
download | DotNetOpenAuth-e865ec7da293496d6c2e67039b86c4ef9ded5a6c.zip DotNetOpenAuth-e865ec7da293496d6c2e67039b86c4ef9ded5a6c.tar.gz DotNetOpenAuth-e865ec7da293496d6c2e67039b86c4ef9ded5a6c.tar.bz2 |
Added OpenID sample sites: RP MVC, RP WebForms, RP Classic ASP, OP WebForms.
Diffstat (limited to 'samples/RelyingPartyWebForms/Code/State.cs')
-rw-r--r-- | samples/RelyingPartyWebForms/Code/State.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/samples/RelyingPartyWebForms/Code/State.cs b/samples/RelyingPartyWebForms/Code/State.cs new file mode 100644 index 0000000..857e02a --- /dev/null +++ b/samples/RelyingPartyWebForms/Code/State.cs @@ -0,0 +1,32 @@ +namespace RelyingPartyWebForms { + using System.Collections.Generic; + using System.Web; + 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 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 void Clear() { + ProfileFields = null; + FriendlyLoginName = null; + PapePolicies = null; + } + } +}
\ No newline at end of file |