Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ServerAuthenticator<Credential, Data, Context>

Type parameters

Hierarchy

  • ServerAuthenticator

Implemented by

Index

Properties

platform: string

Methods

  • Called before the authorization finish, you can make some simple non-async final checks. Return the auth context supplement if success.

    Parameters

    • data: Data

    Returns CheckDataResult<Context>

  • delegateAuthRequest(req: IncomingMessage, res: ServerResponse, routingInfo: Required<RoutingInfo>): Promise<void>
  • Handle requests required in the auth flow, for the most of time, it's used for redirecting user-agent from/to other identity provider (IdP). Any request match route "/{platform}/*" would be delegated to this method, and it's responsible to close the the server response.

    Parameters

    • req: IncomingMessage
    • res: ServerResponse
    • routingInfo: Required<RoutingInfo>

    Returns Promise<void>

  • verifyCredential(credential: Credential): Promise<VerifyResult<Data>>
  • Called when sign requests from client side are received, controller would sign in the user by issuing a token to client and signing a signature wihtin cookie if it resolve success.

    Parameters

    • credential: Credential

    Returns Promise<VerifyResult<Data>>

  • Called when refresh requests from client side are received, controller would refresh token and signature if it resolve success.

    Parameters

    • data: Data

    Returns Promise<VerifyResult<Data>>

Generated using TypeDoc