Skip to content

Commit a1bd1d9

Browse files
Update configure-jwt-bearer-authentication.md (#34609)
1 parent 3b7b3df commit a1bd1d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aspnetcore/security/authentication/configure-jwt-bearer-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ var requireAuthPolicy = new AuthorizationPolicyBuilder()
188188
.Build();
189189

190190
builder.Services.AddAuthorizationBuilder()
191-
.SetFallbackPolicy(requireAuthPolicy);
191+
.SetDefaultPolicy(requireAuthPolicy);
192192
```
193193

194194
The [Authorize](/dotnet/api/microsoft.aspnetcore.authorization.authorizeattribute) attribute can also be used to force the authentication. If multiple schemes are used, the bearer scheme generally needs to be set as the default authentication scheme or specified via `[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme])`.

0 commit comments

Comments
 (0)