Created
August 3, 2017 09:06
-
-
Save DmitrySikorsky/0b6de770705736443efd88edb931c12b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| private IEnumerable<Claim> GetUserClaims(User user) | |
| { | |
| List<Claim> claims = new List<Claim>(); | |
| claims.Add(new Claim(ClaimTypes.NameIdentifier, user.Id.ToString())); | |
| claims.Add(new Claim(ClaimTypes.Name, user.Name)); | |
| claims.AddRange(this.GetUserRoleClaims(user)); | |
| return claims; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment