Member Junction
    Preparing search index...

    Mints the request headers that authorize a call to Vertex AI. The GoogleAuth wraps the client CreateVertexAuthClient builds (an inline service account, or a key file from the environment key), or, with no credentials, resolves Application Default Credentials (workload identity on GKE and Cloud Run, the metadata server on GCE, GOOGLE_APPLICATION_CREDENTIALS), always with the cloud-platform scope. It is created on first use and kept, so the library caches the token until shortly before it expires.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • The headers that authorize one request, with lower-case names: authorization: Bearer <token>, plus x-goog-user-project when the credentials name a quota project. Only a new or expiring token costs a round trip to Google.

      Parameters

      • url: string

        The request URL; the library uses it as the audience of a self-signed JWT.

      Returns Promise<Record<string, string>>

      When no token can be had (no Application Default Credentials, a refused or unreadable key file, a refused grant).