We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a2143a commit a802049Copy full SHA for a802049
aspnetcore/security/authentication/configure-oidc-web-authentication.md
@@ -226,11 +226,8 @@ services.AddAuthentication(options =>
226
// .NET 9 feature
227
options.PushedAuthorizationBehavior = PushedAuthorizationBehavior.Require;
228
229
- options.TokenValidationParameters = new TokenValidationParameters
230
- {
231
- NameClaimType = JwtClaimTypes.Name,
232
- RoleClaimType = JwtClaimTypes.Role,
233
- };
+ options.TokenValidationParameters.NameClaimType = JwtRegisteredClaimNames.Name;
+ options.TokenValidationParameters.RoleClaimType = "roles";
234
});
235
```
236
0 commit comments