Unosquare
    Show / Hide Table of Contents

    Class AuthenticationHandler

    Provides standard handler callbacks for authentication modules.

    Inheritance
    Object
    AuthenticationHandler
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO.Authentication
    Syntax
    public static class AuthenticationHandler

    Methods

    PassThrough(IHttpContext, AuthenticationModuleBase)

    Unconditionally passes a request down the module chain.

    In the case of authentication modules, this is accomplished simply by doing nothing, as the IsFinalHandler property of authentication modules is always set to false.

    Declaration
    public static Task PassThrough(IHttpContext context, AuthenticationModuleBase module)
    Parameters
    Type Name Description
    IHttpContext context

    An IHttpContext interface representing the context of the request.

    AuthenticationModuleBase module

    The authentication module that called the handler.

    Returns
    Type Description
    Task

    A completed .

    Unauthorized(IHttpContext, AuthenticationModuleBase)

    Throws a HttpException with a response code of 401 Unauthorized.

    Declaration
    public static Task Unauthorized(IHttpContext context, AuthenticationModuleBase module)
    Parameters
    Type Name Description
    IHttpContext context

    An IHttpContext interface representing the context of the request.

    AuthenticationModuleBase module

    The authentication module that called the handler.

    Returns
    Type Description
    Task

    This method never returns; it throws an exception instead..

    Unauthorized(String, Object)

    Throws a HttpException with a response code of 401 Unauthorized and, optionally, a custom message and data.

    Declaration
    public static AuthenticationHandlerCallback Unauthorized(string message = null, object data = null)
    Parameters
    Type Name Description
    String message

    A message to include in the response.

    Object data

    The data object to include in the response.

    Returns
    Type Description
    AuthenticationHandlerCallback

    This method never returns; it throws an exception instead..

    See Also

    AuthenticationHandlerCallback

    Comments

    Back to top Copyright © 2017-2019 Unosquare