summaryrefslogtreecommitdiffstats
path: root/samples/RelyingPartyPortal/Code/State.cs
blob: 234c7acb1e34a5cdd89912660abad2827a138e6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System.Web;
using DotNetOpenId.Extensions.SimpleRegistration;

/// <summary>
/// Strong-typed bag of session state.
/// </summary>
public class State {
	public static void Clear() {
		ProfileFields = null;
		FriendlyLoginName = null;
	}
	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; }
	}
}