ExternalAccountAuthorizedUserHandler

ExternalAccountAuthorizedUserHandler

Handler for token refresh requests sent to the token_url endpoint for external authorized user credentials.

Constructor

new ExternalAccountAuthorizedUserHandler(url, transporter, clientAuthentication)

Initializes an ExternalAccountAuthorizedUserHandler instance.

Parameters:
Name Type Description
url

The URL of the token refresh endpoint.

transporter

The transporter to use for the refresh request.

clientAuthentication

The client authentication credentials to use for the refresh request.

Methods

(async) refreshToken(refreshToken, additionalHeaders)

Requests a new access token from the token_url endpoint using the provided refresh token.

Parameters:
Name Type Description
refreshToken

The refresh token to use to generate a new access token.

additionalHeaders

Optional additional headers to pass along the request.

Returns:
Type Description

A promise that resolves with the token refresh response containing the requested access token and its expiration time.