Hierarchy

  • Strategy<this> & PassportStrategyMixin<unknown, this>
    • JwtRefreshStrategy

Constructors

Properties

name: string

Methods

  • Performs authentication for the request. Note: Virtual function - re-implement in the strategy.

    Parameters

    • req: Request

      The request to authenticate.

    • Optionaloptions: any

      Options passed to the strategy.

    Returns void

  • Internal error while performing authentication.

    Strategies should call this function when an internal error occurs during the process of performing authentication; for example, if the user directory is not available.

    Parameters

    • err: Error

    Returns void

    public

  • Fail authentication, with optional challenge and status, defaulting to 401.

    Strategies should call this function to fail an authentication attempt.

    Parameters

    • challenge: any

      (Can also be an object with 'message' and 'type' fields).

    • status: number

    Returns void

    public

  • Fail authentication, with optional challenge and status, defaulting to 401.

    Strategies should call this function to fail an authentication attempt.

    Parameters

    • status: number

    Returns void

    public

  • Pass without making a success or fail decision.

    Under most circumstances, Strategies should not need to call this function. It exists primarily to allow previous authentication state to be restored, for example from an HTTP session.

    Returns void

    public

  • Redirect to url with optional status, defaulting to 302.

    Strategies should call this function to redirect the user (via their user agent) to a third-party website for authentication.

    Parameters

    • url: string
    • Optionalstatus: number

    Returns void

    public

  • Authenticate user, with optional info.

    Strategies should call this function to successfully authenticate a user. user should be an object supplied by the application after it has been given an opportunity to verify credentials. info is an optional argument containing additional user information. This is useful for third-party authentication strategies to pass profile details.

    Parameters

    • user: any
    • Optionalinfo: any

    Returns void

    public