Class UserRefreshClient (9.0.0)

Inheritance

AuthClient > OAuth2Client > UserRefreshClient

Package

google-auth-library

Constructors

(constructor)(clientId, clientSecret, refreshToken)

constructor(clientId?: string, clientSecret?: string, refreshToken?: string);

User Refresh Token credentials.

Parameters
NameDescription
clientId string

The authentication client ID.

clientSecret string

The authentication client secret.

refreshToken string

The authentication refresh token.

(constructor)(options)

constructor(options: UserRefreshClientOptions);

Constructs a new instance of the UserRefreshClient class

Parameter
NameDescription
options UserRefreshClientOptions

(constructor)(clientId, clientSecret, refreshToken)

constructor(clientId?: string, clientSecret?: string, refreshToken?: string);

Constructs a new instance of the UserRefreshClient class

Parameters
NameDescription
clientId string
clientSecret string
refreshToken string

Properties

_refreshToken

_refreshToken?: string | null;

Methods

fromJSON(json)

fromJSON(json: JWTInput): void;

Create a UserRefreshClient credentials instance using the given input options.

Parameter
NameDescription
json JWTInput

The input object.

Returns
TypeDescription
void

fromStream(inputStream)

fromStream(inputStream: stream.Readable): Promise<void>;

Create a UserRefreshClient credentials instance using the given input stream.

Parameter
NameDescription
inputStream stream.Readable

The input stream.

Returns
TypeDescription
Promise<void>

fromStream(inputStream, callback)

fromStream(inputStream: stream.Readable, callback: (err?: Error) => void): void;
Parameters
NameDescription
inputStream stream.Readable
callback (err?: Error) => void
Returns
TypeDescription
void

refreshTokenNoCache(refreshToken)

protected refreshTokenNoCache(refreshToken?: string | null): Promise<GetTokenResponse>;

Refreshes the access token.

Parameter
NameDescription
refreshToken string | null

An ignored refreshToken..

Returns
TypeDescription
Promise<GetTokenResponse>