2
아래 코드를 참조하십시오. 나는이 방법으로 우리가 주문 데이터를 클레임에 추가 할 수 있다는 것을 알았지 만 이제는 그 값을 다시 읽는 방법을 묻습니다. 내가 주장 이메일과 이메일 2에 대한 값을 다시 읽고 싶은 말을 난 당신이 ClaimsIdentity
에 FindFirst(string type)
방법을 사용할 수 있습니다 주장 이메일과 이메일 2에 대한 값을 다시 읽어 감사ASP.Net MVC : 사용자 지정 클레임 값을 읽는 방법
UserManager<applicationuser> userManager = new UserManager<applicationuser>(new UserStore<applicationuser>(new SecurityContext()));
ClaimsIdentity identity = userManager.CreateIdentity(user, DefaultAuthenticationTypes.ApplicationCookie
var user = userManager.Find(userName, password);
identity.AddClaim(new Claim("Email", user.Email));
identity.AddClaim(new Claim("Email2", user.Email));