misc
Some checks failed
Dotnet build and test / log-the-inputs (push) Successful in 9s
Dotnet build and test / build (push) Failing after 1m33s

This commit is contained in:
Paul Schneider
2025-07-07 07:49:18 +01:00
parent 15d35e5508
commit e6f8947c08
36 changed files with 328 additions and 146 deletions

View File

@ -57,18 +57,18 @@ namespace Yavsc.Services
var roles = await this._userManager.GetRolesAsync(user);
if (roles.Count()>0)
{
claims.AddRange(roles.Select(r => new Claim(Constants.RoleClaimName, r)));
claims.AddRange(roles.Select(r => new Claim(JwtClaimTypes.Role, r)));
}
}
return claims;
}
public async Task GetProfileDataAsync(ProfileDataRequestContext context)
public async Task GetProfileDataAsync(ProfileDataRequestContext context)
{
var subjectId = GetSubjectId(context.Subject);
if (subjectId==null) return;
if (subjectId == null) return;
var user = await _userManager.FindByIdAsync(subjectId);
if (user==null) return ;
if (user == null) return;
context.IssuedClaims = await GetClaimsFromUserAsync(context, user);
}