Class HmacAuthenticationOptions
- Assembly
- Cuemon.AspNetCore.Authentication.dll
Configuration options for HmacAuthenticationMiddleware. This class cannot be inherited.
public sealed class HmacAuthenticationOptions : AuthenticationOptions, IValidatableParameterObject, IParameterObject
- Inheritance
-
AuthenticationSchemeOptionsHmacAuthenticationOptions
- Implements
- Inherited Members
-
AuthenticationSchemeOptions.Validate()AuthenticationSchemeOptions.Validate(String)AuthenticationSchemeOptions.ClaimsIssuerAuthenticationSchemeOptions.EventsAuthenticationSchemeOptions.EventsTypeAuthenticationSchemeOptions.ForwardDefaultAuthenticationSchemeOptions.ForwardAuthenticateAuthenticationSchemeOptions.ForwardChallengeAuthenticationSchemeOptions.ForwardForbidAuthenticationSchemeOptions.ForwardSignInAuthenticationSchemeOptions.ForwardSignOutAuthenticationSchemeOptions.ForwardDefaultSelectorAuthenticationSchemeOptions.TimeProvider
Constructors
HmacAuthenticationOptions()
Initializes a new instance of the HmacAuthenticationOptions class.
public HmacAuthenticationOptions()
Properties
Algorithm
Gets or sets the algorithm of the HMAC Authentication. Default is HmacSha256.
public KeyedCryptoAlgorithm Algorithm { get; set; }
Property Value
- KeyedCryptoAlgorithm
The algorithm of the HMAC Authentication.
AuthenticationScheme
Gets the name of the authentication scheme. Default is Scheme.
public string AuthenticationScheme { get; set; }
Property Value
- String
The name of the authentication scheme.
Authenticator
Gets or sets the function delegate that will perform the authentication from the specified publicKey
.
public HmacAuthenticator Authenticator { get; set; }
Property Value
- HmacAuthenticator
The function delegate that will perform the authentication.
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 - AuthenticationScheme cannot be null, empty or consist only of white-space characters.