Options
All
  • Public
  • Public/Protected
  • All
Menu

External Account Authorized User Client. This is used for OAuth2 credentials sourced using external identities through Workforce Identity Federation. Obtaining the initial access and refresh token can be done through the Google Cloud CLI.

Hierarchy

Index

Constructors

  • Instantiates an ExternalAccountAuthorizedUserClient instances using the provided JSON object loaded from a credentials files. An error is throws if the credential is not valid.

    Parameters

    • options: ExternalAccountAuthorizedUserClientOptions

      The external account authorized user option object typically from the external accoutn authorized user JSON credential file.

    • Optional additionalOptions: AuthClientOptions

      DEPRECATED, all options are available in the options parameter. Optional additional behavior customization options. These currently customize expiration threshold time and whether to retry on 401/403 API request errors.

    Returns ExternalAccountAuthorizedUserClient

Properties

credentials: Credentials
eagerRefreshThresholdMillis: number
forceRefreshOnFailure: boolean
projectId?: null | string
quotaProjectId?: string

The quota project ID. The quota project can be used by client libraries for the billing purpose. See Working with quotas

transporter: Transporter
universeDomain: string

Methods

  • getAccessToken(): Promise<{ res?: null | GaxiosResponse<any>; token?: null | string }>
  • Returns Promise<{ res?: null | GaxiosResponse<any>; token?: null | string }>

    A promise that resolves with the current GCP access token response. If the current credential is expired, a new one is retrieved.

  • getRequestHeaders(): Promise<Headers>
  • The main authentication interface. It takes an optional url which when present is the endpoint being accessed, and returns a Promise which resolves with authorization header fields.

    The result has the form: { Authorization: 'Bearer ' }

    Returns Promise<Headers>

  • Provides an alternative Gaxios request implementation with auth credentials

    Type parameters

    • T

    Parameters

    Returns GaxiosPromise<T>

  • Type parameters

    • T

    Parameters

    Returns void

  • Sets the auth credentials.

    Parameters

    Returns void