2016-06-21 5 views

ответ

1

попробуйте что-то вроде этого?

var identity = new ClaimsIdentity(User.Identity); 
identity.RemoveClaim(identity.FindFirst("name")); 
identity.AddClaim(new Claim("name", "Jon")); 

var authenticationManager = HttpContext.GetOwinContext().Authentication; 
authenticationManager.AuthenticationResponseGrant = new AuthenticationResponseGrant(
    new ClaimsPrincipal(identity), 
    new AuthenticationProperties 
    { 
     IsPersistent = true 
    }); 

 Смежные вопросы

  • Нет связанных вопросов^_^