Class Compute (7.5.0)

Inheritance

AuthClient > OAuth2Client > Compute

Package

google-auth-library!

Constructors

(constructor)(options)

  constructor 
 ( 
 options 
 ?: 
  
 ComputeOptions 
 ); 
 

Google Compute Engine service account credentials.

Retrieve access token from the metadata server. See: https://developers.google.com/compute/docs/authentication

Parameter
Name Description
options ComputeOptions

Properties

scopes

  scopes 
 : 
  
 string 
 []; 
 
Property Value
Type Description
string[]

Methods

fetchIdToken(targetAudience)

  fetchIdToken 
 ( 
 targetAudience 
 : 
  
 string 
 ) 
 : 
  
 Promise<string> 
 ; 
 

Fetches an ID token.

Parameter
Name Description
targetAudience string

the audience for the fetched ID token.

Returns
Type Description
Promise <string>

refreshTokenNoCache(refreshToken)

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

Refreshes the access token.

Parameter
Name Description
refreshToken string | null

Unused parameter

Returns
Type Description
Promise < GetTokenResponse >

wrapError(e)

  protected 
  
 wrapError 
 ( 
 e 
 : 
  
 GaxiosError 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
e GaxiosError
Returns
Type Description
void
Design a Mobile Site
View Site in Mobile | Classic
Share by: