BasicAuthenticationOptions class
Options for configuring Basic Authentication in Kestrun.
public class BasicAuthenticationOptions : AuthenticationSchemeOptions, IAuthenticationCommonOptions
Public Members
name | description |
---|---|
BasicAuthenticationOptions() | The default constructor. |
Base64Encoded { get; set; } | Gets or sets a value indicating whether the credentials are Base64 encoded. |
ClaimPolicyConfig { get; set; } | Gets or sets the claim policy configuration. |
HeaderName { get; set; } | Gets or sets the name of the HTTP header used for authentication. |
IssueClaims { get; set; } | After credentials are valid, this is called to add extra Claims. Parameters: HttpContext, username → IEnumerable of extra claims. |
IssueClaimsCodeSettings { get; set; } | Settings for the claims issuing code, if using a script. |
Logger { get; set; } | Gets or sets the Serilog logger used for authentication events. |
Realm { get; set; } | Gets or sets the authentication realm used in the WWW-Authenticate header. |
RequireHttps { get; set; } | Gets or sets a value indicating whether HTTPS is required for authentication. |
SeparatorRegex { get; set; } | Gets or sets the regular expression used to separate the username and password in the credentials. |
SuppressWwwAuthenticate { get; set; } | Gets or sets a value indicating whether to suppress the WWW-Authenticate header in responses. |
ValidateCodeSettings { get; set; } | Settings for the authentication code, if using a script. |
ValidateCredentialsAsync { get; set; } | Delegate to validate user credentials. Parameters: HttpContext, username, password. Returns: Task<bool> indicating validity. |
See Also
- interface IAuthenticationCommonOptions
- namespace Kestrun.Authentication