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 tonull.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Auth Library Client - Class ExternalAccountCredentials (1.47.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.47.1 (latest)](/php/docs/reference/auth/latest/Credentials.ExternalAccountCredentials)\n- [1.47.0](/php/docs/reference/auth/1.47.0/Credentials.ExternalAccountCredentials)\n- [1.46.0](/php/docs/reference/auth/1.46.0/Credentials.ExternalAccountCredentials)\n- [1.45.2](/php/docs/reference/auth/1.45.2/Credentials.ExternalAccountCredentials) \n\nNamespace\n---------\n\nGoogle \\\\ Auth \\\\ Credentials\n\nMethods\n-------\n\n### __construct\n\n### fetchAuthToken\n\nFetches the auth tokens based on the current state.\n\n### getCacheKey\n\nGet the cache token key for the credentials.\n\nThe cache token key format depends on the type of source\nThe format for the cache key one of the following:\nFetcherCacheKey.Scope.\\[ServiceAccount\\].\\[TokenType\\].\\[WorkforcePoolUserProject\\]\nFetcherCacheKey.Audience.\\[ServiceAccount\\].\\[TokenType\\].\\[WorkforcePoolUserProject\\]\n\n### getLastReceivedToken\n\nReturns an associative array with the token and\nexpiration time.\n\n### getQuotaProject\n\nGet the quota project used for this API request\n\n### getUniverseDomain\n\nGet the universe domain used for this API request\n\n### getProjectId\n\nGet the project ID."]]