Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

  • Parameters

    Returns AuthClient

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(url?: string): 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 ' }

    Parameters

    • Optional url: string

      The URI being authorized.

    Returns Promise<Headers>

  • Subscribes a listener to the tokens event triggered when a token is generated.

    Parameters

    Returns AuthClient

  • Provides an alternative Gaxios request implementation with auth credentials

    Type parameters

    • T

    Parameters

    Returns GaxiosPromise<T>

  • Sets the auth credentials.

    Parameters

    Returns void