IMPORTANT: This class does not validate the credential configuration. A security risk occurs when a credential configuration configured with malicious urls is used.
When the credential configuration is accepted from an untrusted source, you should validate it before creating this class.
- see https://cloud.google.com/docs/authentication/external/externally-sourced-credentials
| Constants |
| Methods |
public __construct( $scope, array $jsonKey)
|
public fetchAuthToken(?callable $httpHandler = NULL, array $headers = [])
|
| public getCacheKey() : ?string 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]
|
| public getLastReceivedToken() |
| public getProjectId(?callable $httpHandler = NULL, ?string $accessToken = NULL) Get the project ID.
|
| public getQuotaProject() Get the quota project used for this API request
|
| public getUniverseDomain() : string Get the universe domain used for this API request
|
| public getUpdateMetadataFunc() export a callback function which updates runtime metadata.
|
| public updateMetadata( $metadata, $authUri = NULL, ?callable $httpHandler = NULL) Updates metadata with the authorization token.
|
| Properties |
protected static $metricMetadataKey = 'x-goog-api-client'
|
| Methods |
protected applyServiceApiUsageMetrics( $metadata)
|
protected applyTokenEndpointMetrics( $metadata, $authRequestType)
|
| protected getCredType() : string |
protected static getMetricsHeader( $credType = '', $authRequestType = '') : string
|
| protected static getVersion() : string |
| Constants |
| private Google |
| private Google |
| Properties |
| private Google |
private ?array $lastImpersonatedAccessToken
|
| private ?string $projectId |
| private ?string $quotaProject |
| private ?string $serviceAccountImpersonationUrl |
| private string $universeDomain |
private static $version = NULL
|
| private ?string $workforcePoolUserProject |
| Methods |
private static buildCredentialSource(array $jsonKey) : Google
|
private getImpersonatedAccessToken(string $stsToken, ?callable $httpHandler = NULL) : array
|
| private getProjectNumber() : ?string |
| private isWorkforcePool() : bool |
| Properties |
protected static $metricMetadataKey = 'x-goog-api-client'
|
private static $version = NULL
|
| Methods |
private static buildCredentialSource(array $jsonKey) : Google
|
protected static getMetricsHeader( $credType = '', $authRequestType = '') : string
|
| protected static getVersion() : string |