Skip to content

Commit

Permalink
#218 - Include user id in bearer token.
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf committed Mar 2, 2019
1 parent 3176615 commit 8162ba2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Money.Api/Users/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public async Task<IActionResult> Login([FromBody] LoginRequest model)
{
var claims = new[]
{
new Claim(ClaimTypes.Name, model.UserName)
new Claim(ClaimTypes.Name, user.UserName),
new Claim(ClaimTypes.NameIdentifier, user.Id)
};

var credentials = new SigningCredentials(configuration.GetSecurityKey(), SecurityAlgorithms.HmacSha256);
Expand Down

0 comments on commit 8162ba2

Please sign in to comment.