Если я создаю пользовательский принципал с пятью пользовательскими свойствами (например, phoneNumber), данные принципала передаются внутри файла cookie или данные остаются на сервере?
void MvcApplication_AuthenticateRequest(object sender, EventArgs e)
{
if (HttpContext.Current.User != null)
{
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
if (HttpContext.Current.User.Identity is FormsIdentity)
{
// Get Forms Identity From Current User
FormsIdentity id = (FormsIdentity)HttpContext.Current.User.Identity;
// Get Forms Ticket From Identity object
FormsAuthenticationTicket ticket = id.Ticket;
// Create a new Generic Principal Instance and assign to Current User
IFGPrincipal siteUser = new IFGPrincipal(Context.User.Identity, new string[] { }, 2);
HttpContext.Current.User = siteUser;
}
}
}
}