Class BasicAuthenticationOptions
- Assembly
- Cuemon.AspNetCore.Authentication.dll
Configuration options for BasicAuthenticationMiddleware. This class cannot be inherited.
public sealed class BasicAuthenticationOptions : AuthenticationOptions, IValidatableParameterObject, IParameterObject
- Inheritance
-
AuthenticationSchemeOptionsBasicAuthenticationOptions
- Implements
- Inherited Members
-
AuthenticationSchemeOptions.Validate()AuthenticationSchemeOptions.Validate(String)AuthenticationSchemeOptions.ClaimsIssuerAuthenticationSchemeOptions.EventsAuthenticationSchemeOptions.EventsTypeAuthenticationSchemeOptions.ForwardDefaultAuthenticationSchemeOptions.ForwardAuthenticateAuthenticationSchemeOptions.ForwardChallengeAuthenticationSchemeOptions.ForwardForbidAuthenticationSchemeOptions.ForwardSignInAuthenticationSchemeOptions.ForwardSignOutAuthenticationSchemeOptions.ForwardDefaultSelectorAuthenticationSchemeOptions.TimeProvider
Constructors
BasicAuthenticationOptions()
Initializes a new instance of the BasicAuthenticationOptions class.
public BasicAuthenticationOptions()
Remarks
The following table shows the initial property values for an instance of BasicAuthenticationOptions.
Property | Initial Value |
---|---|
Authenticator | null |
Realm | AuthenticationServer |
Properties
Authenticator
Gets or sets the function delegate that will perform the authentication from the specified username
and password
.
public BasicAuthenticator Authenticator { get; set; }
Property Value
- BasicAuthenticator
The function delegate that will perform the authentication.
Realm
Gets the realm that defines the protection space.
public string Realm { get; set; }
Property Value
- String
The realm that defines the protection space.
Methods
ValidateOptions()
Determines whether the public read-write properties of this instance are in a valid state.
public override void ValidateOptions()
Remarks
This method is expected to throw exceptions when one or more conditions fails to be in a valid state.
Exceptions
- InvalidOperationException
Authenticator cannot be null - or - Realm cannot be null, empty or consist only of white-space characters.