You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// options.FallbackPolicy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build();
61
61
//});
62
62
}
63
63
@@ -178,16 +178,20 @@ Required to be set. It is the name of the header if it is setup as in-header or
178
178
#### Realm
179
179
Required to be set if SuppressWWWAuthenticateHeader is not set to true. It is used with WWW-Authenticate response header when challenging un-authenticated requests.
180
180
181
-
#### ForLegacyIgnoreExtraValidatedApiKeyCheck
182
-
Default value is false.
183
-
If set to true, IApiKey.Key property returned from IApiKeyProvider.ProvideAsync(string) method is not compared with the key parsed from the request.
184
-
This extra check did not existed in the previous version. So you if want to revert back to old version validation, please set this to true.
185
-
186
181
#### SuppressWWWAuthenticateHeader
187
182
Default value is false.
188
183
When set to true, it will NOT return WWW-Authenticate response header when challenging un-authenticated requests.
189
184
When set to false, it will return WWW-Authenticate response header when challenging un-authenticated requests.
190
185
186
+
#### IgnoreAuthenticationIfAllowAnonymous
187
+
Default value is false.
188
+
If set to true, it checks if AllowAnonymous filter on controller action or metadata on the endpoint which, if found, it does not try to authenticate the request.
189
+
190
+
#### ForLegacyIgnoreExtraValidatedApiKeyCheck
191
+
Default value is false.
192
+
If set to true, IApiKey.Key property returned from IApiKeyProvider.ProvideAsync(string) method is not compared with the key parsed from the request.
193
+
This extra check did not existed in the previous version. So you if want to revert back to old version validation, please set this to true.
194
+
191
195
#### Events
192
196
The object provided by the application to process events raised by the api key authentication middleware.
193
197
The application may implement the interface fully, or it may create an instance of ApiKeyEvents and assign delegates only to the events it wants to process.
@@ -222,9 +226,9 @@ Please note that, by default, with ASP.NET Core, all the requests are not challe
222
226
However, if you want all the requests to challenge authentication by default, depending on what you are using, you can add the below options line to *ConfigureServices* method on *Startup* class.
0 commit comments