Skip to content

Commit

Permalink
feat(users): include user email in jwt
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosPavajeau committed Sep 3, 2021
1 parent 7d98de8 commit fbaf6d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Armory/Users/Application/GenerateJwt/JwtGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public string Generate(ArmoryUser user, IEnumerable<string> roles)
Subject = new ClaimsIdentity(new[]
{
new Claim(ClaimTypes.NameIdentifier, user.Id),
new Claim(ClaimTypes.Name, user.UserName)
new Claim(ClaimTypes.Name, user.UserName),
new Claim(ClaimTypes.Email, user.Email)
}),
Expires = DateTime.Now.AddDays(TokenDurationDays),
SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key),
Expand Down

0 comments on commit fbaf6d2

Please sign in to comment.