Compartilhar via


AuthenticationHandler Class

 

Base class for the per-request work performed by most authentication middleware.

Namespace:   Microsoft.Owin.Security.Infrastructure
Assembly:  Microsoft.Owin.Security (in Microsoft.Owin.Security.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Owin.Security.Infrastructure.AuthenticationHandler
    Microsoft.Owin.Security.Infrastructure.AuthenticationHandler<TOptions>

Syntax

public abstract class AuthenticationHandler
public ref class AuthenticationHandler abstract 
[<AbstractClass>]
type AuthenticationHandler = class end
Public MustInherit Class AuthenticationHandler

Constructors

Name Description
System_CAPS_protmethod AuthenticationHandler()

Initializes a new instance of the AuthenticationHandler class.

Properties

Name Description
System_CAPS_protproperty Context

System_CAPS_protproperty Faulted

System_CAPS_protproperty Helper

System_CAPS_protproperty Request

System_CAPS_protproperty RequestPathBase

System_CAPS_protproperty Response

Methods

Name Description
System_CAPS_protmethod ApplyResponseChallengeAsync()

Override this method to dela with 401 challenge concerns, if an authentication scheme in question deals an authentication interaction as part of it's request flow. (like adding a response header, or changing the 401 result to 302 of a login page or external sign-in location.)

System_CAPS_protmethod ApplyResponseCoreAsync()

Core method that may be overridden by handler. The default behavior is to call two common response activities, one that deals with sign-in/sign-out concerns, and a second to deal with 401 challenges.

System_CAPS_protmethod ApplyResponseGrantAsync()

Override this method to dela with sign-in/sign-out concerns, if an authentication scheme in question deals with grant/revoke as part of it's request flow. (like setting/deleting cookies)

System_CAPS_pubmethod AuthenticateAsync()

Causes the authentication logic in AuthenticateCore to be performed for the current request at most once and returns the results. Calling Authenticate more than once will always return the original value. This method should always be called instead of calling AuthenticateCore directly.

System_CAPS_protmethod AuthenticateCoreAsync()

The core authentication logic which must be provided by the handler. Will be invoked at most once per request. Do not call directly, call the wrapping Authenticate method instead.

System_CAPS_protmethod BaseInitializeAsync(AuthenticationOptions, IOwinContext)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_protmethod GenerateCorrelationId(AuthenticationProperties)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod InitializeCoreAsync()

System_CAPS_pubmethod InvokeAsync()

Called once by common code after initialization. If an authentication middleware responds directly to specifically known paths it must override this virtual, compare the request path to it's known paths, provide any response information as appropriate, and true to stop further processing.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod TeardownCoreAsync()

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_protmethod ValidateCorrelationId(AuthenticationProperties, ILogger)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Owin.Security.Infrastructure Namespace

Return to top