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
@@ -164,8 +169,8 @@ Required to be set if SuppressWWWAuthenticateHeader is not set to true. It is us
164
169
165
170
### SuppressWWWAuthenticateHeader
166
171
Default value is false.
167
-
When set to true, it will NOT return WWW-Authenticate response header when challenging un-authenticated requests.
168
-
When set to false, it will return WWW-Authenticate response header when challenging un-authenticated requests.
172
+
If set to true, it will NOT return WWW-Authenticate response header when challenging un-authenticated requests.
173
+
If set to false, it will return WWW-Authenticate response header when challenging un-authenticated requests.
169
174
170
175
### IgnoreAuthenticationIfAllowAnonymous (available on ASP.NET Core 3.0 onwards)
171
176
Default value is false.
@@ -177,15 +182,15 @@ The application may implement the interface fully, or it may create an instance
177
182
-#### OnValidateCredentials
178
183
A delegate assigned to this property will be invoked just before validating credentials.
179
184
You must provide a delegate for this property for authentication to occur.
180
-
In your delegate you should either call context.ValidationSucceeded() which will handle construction of authentication principal from the user details which will be assiged the context.Principal property and call context.Success(), or construct an authentication principal from the user details & attach it to the context.Principal property and finally call context.Success() method.
185
+
In your delegate you should either call context.ValidationSucceeded() which will handle construction of authentication claims principal from the user details which will be assiged the context.Principal property and calls context.Success(), or construct an authentication claims principal from the user details and assign it to the context.Principal property and finally call context.Success() method.
181
186
If only context.Principal property set without calling context.Success() method then, Success() method is automaticalled called.
182
187
183
188
-#### OnAuthenticationSucceeded
184
189
A delegate assigned to this property will be invoked when the authentication succeeds. It will not be called if OnValidateCredentials delegate is assigned.
185
190
It can be used for adding claims, headers, etc to the response.
186
191
187
192
-#### OnAuthenticationFailed
188
-
A delegate assigned to this property will be invoked when the authentication fails.
193
+
A delegate assigned to this property will be invoked when any unexpected exception is thrown within the library.
189
194
190
195
-#### OnHandleChallenge
191
196
A delegate assigned to this property will be invoked before a challenge is sent back to the caller when handling unauthorized response.
0 commit comments