This commit is contained in:
mmrbnjd
2025-08-20 14:15:10 +03:30
parent 69a75731ce
commit c535cb078e
7 changed files with 50 additions and 49 deletions

View File

@@ -27,7 +27,10 @@ namespace Hushian.Application.Services
{
var claims = new[]
{
new Claim(JwtRegisteredClaimNames.Sub,userId.ToString()),
new Claim(JwtRegisteredClaimNames.Sub,
Role=="User" ? "U"+userId.ToString()
:Role=="Company" ? "C"+userId.ToString()
:userId.ToString()),
new Claim(ClaimTypes.NameIdentifier, UserName),
new Claim(CustomClaimTypes.Uid,userId.ToString()),
new Claim(ClaimTypes.Role, Role)