parse all available .access in the path

This commit is contained in:
Paul Schneider 2020-10-11 01:45:45 +01:00
commit 65f199299d
2 changed files with 13 additions and 7 deletions

View file

@ -105,9 +105,11 @@ namespace Yavsc
var claims = new List<Claim>(
context.Scope.Select(x => new Claim("urn:oauth:scope", x))
);
claims.Add(new Claim(ClaimTypes.NameIdentifier, user.Id));
claims.Add(new Claim(ClaimTypes.Email, user.Email));
)
{
new Claim(ClaimTypes.NameIdentifier, user.Id),
new Claim(ClaimTypes.Email, user.Email)
};
claims.AddRange((await _usermanager.GetRolesAsync(user)).Select(
r => new Claim(ClaimTypes.Role, r)
));