Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OtpAuthHandler

An auth handler that provides One Time Password (Multi-Factor) Authentication support.

Hierarchy

  • OtpAuthHandler

Implements

Index

Methods

handle

issuer

  • Configure the issuer value to be shown in the authenticator URL.

    Parameters

    • issuer: string

    Returns OtpAuthHandler

label

  • Configure the label value to be shown in the authenticator URL. When this value is provided it will overwrite the default label which is composed of the issuer and the current user id.

    Parameters

    • label: string

    Returns OtpAuthHandler

setupCallback

  • Setup the required route where authenticators to submit the challenge response. Challenges are only allowed on requests with a valid user.

    A user is valid when the is not null.

    Parameters

    Returns OtpAuthHandler

setupRegisterCallback

  • Setup the optional route where authenticators are allowed to register. Registration is only allowed on requests with a valid user.

    A user is valid when the is not null.

    Parameters

    Returns OtpAuthHandler

verifyUrl

  • Specify the URL where requests are to be redirected when a user is already known in the request.

    A user is already known when the is not null.

    If no redirect is provided, requests are terminated immediately with status code 401.

    Parameters

    • url: string

    Returns OtpAuthHandler

Static create

  • Create a new instance of this handler using a time based one time password authentication provider.

    Parameters

    • totpAuth: TotpAuth

    Returns OtpAuthHandler

  • Create a new instance of this handler using a hash based one time password authentication provider.

    Parameters

    • hotpAuth: HotpAuth

    Returns OtpAuthHandler

Generated using TypeDoc