AzureAD / azure-activedirectory-identitymodel-extensions-for-dotnet

IdentityModel extensions for .Net
MIT License
1.07k stars 401 forks source link

[Bug] JwtRegisteredClaimNames is incomplete #1911

Closed dojoincom closed 8 months ago

dojoincom commented 2 years ago

Which version of Microsoft.IdentityModel are you using? 6.21.0.0

Where is the issue?

Is this a new or an existing app? c. This is a new app or an experiment.

Expected behaviour Based on this link from IANA, there are more than eighty JWT claim names, but the System.IdentityModel.Tokens.Jwt.JwtRegisteredClaimNames has twenty seven claim names. I needed to add user's roles to the token which in JWT is named "roles", but it is not available in the JwtRegisteredClaimNames struct.

Actual behaviour System.IdentityModel.Tokens.Jwt.JwtRegisteredClaimNames should have more JWT claim names.

Additional context / logs / screenshots / links to code https://www.iana.org/assignments/jwt/jwt.xhtml https://www.rfc-editor.org/rfc/rfc7643.html#section-4.1.2

brentschmaltz commented 2 years ago

@dorinung yes, there are additional claim names. Not sure when we will add them all.

brentschmaltz commented 8 months ago

@dorinung closing as we have a duplicate #1598