Skip to content

Commit 387a3fb

Browse files
committed
added first and liastname to caimsprincipal
1 parent 6af1cad commit 387a3fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

exercise.wwwapi/Endpoints/UserEndpoints.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,9 @@ private static string CreateToken(User user, IConfigurationSettings configuratio
389389
new(ClaimTypes.Sid, user.Id.ToString()),
390390
new(ClaimTypes.Name, user.Username),
391391
new(ClaimTypes.Email, user.Email),
392-
new(ClaimTypes.Role, user.Role.ToString())
392+
new(ClaimTypes.Role, user.Role.ToString()),
393+
new("FirstName", user.FirstName),
394+
new("LastName", user.LastName)
393395
};
394396

395397
var tokenKey = Environment.GetEnvironmentVariable(Globals.EnvironmentEnvVariable) == "Staging"

0 commit comments

Comments
 (0)