summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdRelyingPartyWebForms/Code/State.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-03-26 16:01:37 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-03-26 16:01:37 -0700
commitfc29aefdf4fe9fb1081ee21c01f5ba3963904be6 (patch)
tree74e1cb88f7a600f446df513a3a15a0104d7ff7e7 /samples/OpenIdRelyingPartyWebForms/Code/State.cs
parentd18ea6028e8c6cadbf99e2c4529350c26224c6ff (diff)
parentad95a2e4ab219a246a2288c62452b0d920a7cdc2 (diff)
downloadDotNetOpenAuth-fc29aefdf4fe9fb1081ee21c01f5ba3963904be6.zip
DotNetOpenAuth-fc29aefdf4fe9fb1081ee21c01f5ba3963904be6.tar.gz
DotNetOpenAuth-fc29aefdf4fe9fb1081ee21c01f5ba3963904be6.tar.bz2
Merge branch 'samplerename'
Diffstat (limited to 'samples/OpenIdRelyingPartyWebForms/Code/State.cs')
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Code/State.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/samples/OpenIdRelyingPartyWebForms/Code/State.cs b/samples/OpenIdRelyingPartyWebForms/Code/State.cs
new file mode 100644
index 0000000..4861a34
--- /dev/null
+++ b/samples/OpenIdRelyingPartyWebForms/Code/State.cs
@@ -0,0 +1,32 @@
+namespace OpenIdRelyingPartyWebForms {
+ 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