Class AuthenticationOptions
- Namespace
- Excalibur.Dispatch.Options.Middleware
- Assembly
- Excalibur.Dispatch.dll
Configuration options for authentication middleware.
public sealed class AuthenticationOptions
- Inheritance
-
AuthenticationOptions
- Inherited Members
- Extension Methods
Properties
AllowAnonymousForTypes
Gets or sets message types that allow anonymous access.
public string[]? AllowAnonymousForTypes { get; set; }
Property Value
- string[]
The current AllowAnonymousForTypes value.
CacheDuration
Gets or sets the duration to cache authentication results.
public TimeSpan CacheDuration { get; set; }
Property Value
- TimeSpan
Default is 5 minutes.
DefaultScheme
Gets or sets the default authentication scheme.
public string DefaultScheme { get; set; }
Property Value
- string
Default is "Bearer".
EnableCaching
Gets or sets a value indicating whether to enable authentication caching.
public bool EnableCaching { get; set; }
Property Value
- bool
Default is true.
Enabled
Gets or sets a value indicating whether authentication is enabled.
public bool Enabled { get; set; }
Property Value
- bool
Default is true.
MaxCacheSize
Gets or sets the maximum number of cached authentications.
public int MaxCacheSize { get; set; }
Property Value
- int
Default is 1000.
RequireAuthentication
Gets or sets a value indicating whether authentication is required for all messages.
public bool RequireAuthentication { get; set; }
Property Value
- bool
Default is true.
TokenHeader
Gets or sets the header name containing the authentication token.
public string TokenHeader { get; set; }
Property Value
- string
Default is "Authorization".