const string COOKIE_NAME = "xyz";
string subject = "";
if (HttpContext.Current.Request.Cookies[COOKIE_NAME] != null)
{
allClaims = new Dictionary<String, String>();
HttpCookie authCookie = HttpContext.Current.Request.Cookies[COOKIE_NAME];
NameValueCollection col = new NameValueCollection(authCookie.Values);
String[] keyNames = col.AllKeys;
foreach (string key in keyNames)
{
allClaims.Add(key, col.GetValues(key)[0]);
}
subject = authCookie["subject"].ToString();
}
string subject = "";
if (HttpContext.Current.Request.Cookies[COOKIE_NAME] != null)
{
allClaims = new Dictionary<String, String>();
HttpCookie authCookie = HttpContext.Current.Request.Cookies[COOKIE_NAME];
NameValueCollection col = new NameValueCollection(authCookie.Values);
String[] keyNames = col.AllKeys;
foreach (string key in keyNames)
{
allClaims.Add(key, col.GetValues(key)[0]);
}
subject = authCookie["subject"].ToString();
}
No comments:
Post a Comment