Table of Contents

Class AuthenticationOptions

Namespace
Cuemon.AspNetCore.Authentication
Assembly
Cuemon.AspNetCore.Authentication.dll

Base options for all authentication middleware.

public abstract class AuthenticationOptions : AuthenticationSchemeOptions, IValidatableParameterObject, IParameterObject
Inheritance
Object
AuthenticationSchemeOptions
AuthenticationOptions
Implements
Derived
Inherited Members
AuthenticationSchemeOptions.Validate()
AuthenticationSchemeOptions.Validate(String)
AuthenticationSchemeOptions.ClaimsIssuer
AuthenticationSchemeOptions.Events
AuthenticationSchemeOptions.EventsType
AuthenticationSchemeOptions.ForwardDefault
AuthenticationSchemeOptions.ForwardAuthenticate
AuthenticationSchemeOptions.ForwardChallenge
AuthenticationSchemeOptions.ForwardForbid
AuthenticationSchemeOptions.ForwardSignIn
AuthenticationSchemeOptions.ForwardSignOut
AuthenticationSchemeOptions.ForwardDefaultSelector
AuthenticationSchemeOptions.TimeProvider

Constructors

AuthenticationOptions()

Initializes a new instance of the AuthenticationOptions class.

protected AuthenticationOptions()

Remarks

The following table shows the initial property values for an instance of AuthenticationOptions.

PropertyInitial Value
ResponseHandler() => new HttpResponseMessage(HttpStatusCode.Unauthorized) { Content = new StringContent(UnauthorizedMessage) };
RequireSecureConnectiontrue
UnauthorizedMessageThe request has not been applied because it lacks valid authentication credentials for the target resource.

Properties

RequireSecureConnection

Gets or sets a value indicating whether a HTTP connection is required to use secure sockets (that is, HTTPS).

public bool RequireSecureConnection { get; set; }

Property Value

Boolean

true if the HTTP connection is required to use secure sockets (that is, HTTPS); otherwise, false.

ResponseHandler

Gets or sets the function delegate that configures the unauthorized response in the form of a System.Net.Http.HttpResponseMessage.

public Func<HttpResponseMessage> ResponseHandler { get; set; }

Property Value

Func<HttpResponseMessage>

The function delegate that configures the unauthorized response in the form of a System.Net.Http.HttpResponseMessage.

UnauthorizedMessage

Gets or sets the message of an unauthorized request.

public string UnauthorizedMessage { get; set; }

Property Value

String

The message of an unauthorized request.

Methods

ValidateOptions()

Determines whether the public read-write properties of this instance are in a valid state.

public virtual void ValidateOptions()

Remarks

This method is expected to throw exceptions when one or more conditions fails to be in a valid state.

Exceptions

System.InvalidOperationException

UnauthorizedMessage cannot be null.

See Also

AuthenticationSchemeOptions