Google Auth Library Client - Class ExternalAccountCredentials (1.45.2)

Namespace

Google \ Auth \ Credentials

Methods

__construct

Parameters
Name Description
scope string|string[]

The scope of the access request, expressed either as an array or as a space-delimited string.

jsonKey array

JSON credentials as an associative array.

fetchAuthToken

Fetches the auth tokens based on the current state.

Parameters
Name Description
httpHandler callable|null
headers array

[optional] Metrics headers to be inserted into the token endpoint request present.

Returns
Type Description
array { A set of auth related metadata, containing the following @type string $access_token @type int $expires_at (impersonated service accounts only) @type int $expires_in (identity pool only) @type string $issued_token_type (identity pool only) @type string $token_type (identity pool only) }

getCacheKey

Get the cache token key for the credentials.

The cache token key format depends on the type of source The format for the cache key one of the following: FetcherCacheKey.Scope.[ServiceAccount].[TokenType].[WorkforcePoolUserProject] FetcherCacheKey.Audience.[ServiceAccount].[TokenType].[WorkforcePoolUserProject]

getLastReceivedToken

Returns an associative array with the token and expiration time.

getQuotaProject

Get the quota project used for this API request

Returns
Type Description
string|null

getUniverseDomain

Get the universe domain used for this API request

Returns
Type Description
string

getProjectId

Get the project ID.

Parameters
Name Description
httpHandler callable|null

Callback which delivers psr7 request

accessToken string|null

The access token to use to sign the blob. If provided, saves a call to the metadata server for a new access token. Defaults to null.

Returns
Type Description
string|null