Hierarchy

  • AccessToken

Properties

access_token: string

The access token itself, can be an opaque string, JWT, or non-JWT token.

expires_in: number

Number of seconds until the access token expires.

isExpired: (() => boolean)

Type declaration

    • (): boolean
    • Returns true if the access_token has expired.

      Returns boolean

token_type: string

The type of access token, Usually "Bearer".

Methods

  • Performs refresh_token grant type exchange and updates the session's access token.

    let accessToken = req.oidc.accessToken;
    if (accessToken.isExpired()) {
    accessToken = await accessToken.refresh();
    }

    Parameters

    Returns Promise<AccessToken>