也许以下文章可以帮助您:
var claims = new List<Claim>();claims.Add(new Claim(ClaimTypes.Name, "Brock"));claims.Add(new Claim(ClaimTypes.Email, "brockallen@gmail.com"));var id = new ClaimsIdentity(claims,DefaultAuthenticationTypes.Applicationcookie);var ctx = Request.GetOwinContext();var authenticationManager = ctx.Authentication;authenticationManager.SignIn(id);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)