GoogleToken

GoogleToken

The GoogleToken class is used to manage authentication with Google's OAuth 2.0 authorization server. It handles fetching, caching, and refreshing of access tokens.

Constructor

new GoogleToken(options)

Create a GoogleToken.

Parameters:
Name Type Description
options

Configuration object.

Members

accessToken

The most recent access token obtained by this client.

googleTokenOptions

Returns the configuration options for this token instance.

idToken

The most recent ID token obtained by this client.

refreshToken

The refresh token for the current credentials.

tokenHandler

The handler for token fetching and caching logic.

tokenOptions

The configuration options for this token instance.

tokenType

The token type of the most recent access token.

Methods

hasExpired()

A boolean indicating if the current token has expired.

isTokenExpiring()

A boolean indicating if the current token is expiring soon, based on the eagerRefreshThresholdMillis option.