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
// It requires Realm to be set in the options if SuppressWWWAuthenticateHeader is not set.
13
+
// If an implementation of IBasicUserValidationService interface is registered in the dependency register as well as OnValidateCredentials delegete on options.Events is also set then this delegate will be used instead of an implementation of IBasicUserValidationService.
// The below AddBasic without type parameter will require OnValidateCredentials delegete on options.Events to be set unless an implementation of IBasicUserValidationService interface is registered in the dependency register.
17
+
// Please note if both the delgate and validation server are set then the delegate will be used instead of BasicUserValidationService.
18
+
//.AddBasic(options =>
19
+
20
+
// The below AddBasic with type parameter will add the BasicUserValidationService to the dependency register.
21
+
// Please note if OnValidateCredentials delegete on options.Events is also set then this delegate will be used instead of BasicUserValidationService.
22
+
.AddBasic<BasicUserValidationService>(options =>
23
+
{
24
+
options.Realm="Sample Web API";
25
+
26
+
//// Optional option to suppress the browser login dialog for ajax calls.
27
+
//options.SuppressWWWAuthenticateHeader = true;
28
+
29
+
//// Optional option to ignore authentication if AllowAnonumous metadata/filter attribute is added to an endpoint.
// context.Handled(); // important! do not forget to call this method at the end.
103
+
//},
104
+
105
+
//// A delegate assigned to this property will be invoked when the authentication succeeds. It will not be called if OnValidateCredentials delegate is assigned.
106
+
//// It can be used for adding claims, headers, etc to the response.
107
+
//OnAuthenticationSucceeded = (context) =>
108
+
//{
109
+
// //custom code to add extra bits to the success response.
0 commit comments