Package
google-auth-libraryConstructors
(constructor)(options)
constructor(options?: ImpersonatedOptions);Impersonated service account credentials.
Create a new access token by impersonating another service account.
Impersonated Credentials allowing credentials issued to a user or service account to impersonate another. The source project using Impersonated Credentials must enable the "IAMCredentials" API. Also, the target service account must grant the orginating principal the "Service Account Token Creator" IAM role.
| Name | Description |
| options | ImpersonatedOptions The configuration object. |
Methods
fetchIdToken(targetAudience, options)
fetchIdToken(targetAudience: string, options?: FetchIdTokenOptions): Promise<string>;Generates an OpenID Connect ID token for a service account.
| Name | Description |
| targetAudience | string the audience for the fetched ID token. |
| options | FetchIdTokenOptions the for the request an OpenID Connect ID token |
| Type | Description |
| Promise<string> |
refreshToken(refreshToken)
protected refreshToken(refreshToken?: string | null): Promise<GetTokenResponse>;Refreshes the access token.
| Name | Description |
| refreshToken | string | null Unused parameter |
| Type | Description |
| Promise<GetTokenResponse> |