ExternalAccountCredentials
class ExternalAccountCredentials implements FetchAuthTokenInterface, UpdateMetadataInterface, GetQuotaProjectInterface, GetUniverseDomainInterface, ProjectIdProviderInterface (View source)
Traits
Provides shared methods for updating request metadata (request headers).
Trait containing helper methods required for enabling observability metrics in the library.
Constants
private EXTERNAL_ACCOUNT_TYPE |
|
private CLOUD_RESOURCE_MANAGER_URL |
|
Properties
static protected string | $metricMetadataKey | from MetricsTrait |
Methods
No description
No description
Updates metadata with the authorization token.
No description
No description
Get the cache token key for the credentials.
Returns an associative array with the token and expiration time.
Get the quota project used for this API request
Get the universe domain used for this API request
Get the project ID.
Details
static protected string
getMetricsHeader(string $credType = '', string $authRequestType = '')
No description
protected array
applyServiceApiUsageMetrics(array $metadata)
No description
protected array
applyTokenEndpointMetrics(array $metadata, string $authRequestType)
No description
static protected string
getVersion()
No description
protected string
getCredType()
No description
callable
getUpdateMetadataFunc()
deprecated
deprecated
export a callback function which updates runtime metadata.
array
updateMetadata(array $metadata, string $authUri = null, callable|null $httpHandler = null)
Updates metadata with the authorization token.
__construct(string|string[] $scope, array $jsonKey)
No description
array
fetchAuthToken(callable|null $httpHandler = null)
No description
string
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]
null|array
getLastReceivedToken()
Returns an associative array with the token and expiration time.
string|null
getQuotaProject()
Get the quota project used for this API request
string
getUniverseDomain()
Get the universe domain used for this API request
string|null
getProjectId(callable|null $httpHandler = null, string|null $accessToken = null)
Get the project ID.