Skip to content

Commit

Permalink
Added the user claim to the token (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDave1999 authored Jan 31, 2023
1 parent bc199a3 commit 6fc85d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Itminus.InDirectLine.Core/Services/TokenBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public string BuildToken(string userName, IList<Claim> claims, int expireTime)
}

claims.Add(new Claim(ClaimTypes.Name,userName));
claims.Add(new Claim("user", userName));

var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(this._authenticationOpts.Key));
var sign = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
Expand Down

0 comments on commit 6fc85d2

Please sign in to comment.