Created
March 7, 2014 14:35
-
-
Save benfoster/9412542 to your computer and use it in GitHub Desktop.
Refreshing claims using ASP.NET Identity Cooke based AuthN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AuthenticationManagerExtensions | |
{ | |
public static void RefreshUserClaims( | |
this IAuthenticationManager authManager, | |
IEnumerable<Claim> updatedClaims, | |
string authenticationType) | |
{ | |
var identity = new ClaimsIdentity(updatedClaims, authenticationType); | |
authManager.SignOut(authenticationType); | |
authManager.SignIn(identity); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment