Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AccessToken

Index

Properties

access_token

access_token: string

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

expires_in

expires_in: number

Number of seconds until the access token expires.

isExpired

isExpired: () => boolean

Returns true if the access_token has expired.

Type declaration

    • (): boolean
    • Returns boolean

token_type

token_type: string

The type of access token, Usually "Bearer".

Methods

refresh

  • 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>