public static void SignIn(myAccount account) { SignOut(); var claims = new List <Claim>(); claims.Add(new Claim(ClaimTypes.Name, account.Id)); claims.Add(new Claim(ClaimTypes.GivenName, account.Id)); var identities = new TqUserIdentity(claims, DefaultAuthenticationTypes.ApplicationCookie); AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = false }, identities); HttpContext.Current.User = new TqUserPrincipal(AuthenticationManager.AuthenticationResponseGrant.Principal); }
public TqUserPrincipal(TqUserIdentity identity) : base(identity) { }