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
Obtains a key that can used to cache the results of #fetchAuthToken.
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 $httpHandler = null)
        
    
    Updates metadata with the authorization token.
        
        
    __construct(string|string[] $scope, array $jsonKey)
        
    
    No description
        
                            array
    fetchAuthToken(callable $httpHandler = null)
        
    
    No description
        
                            string
    getCacheKey()
        
    
    Obtains a key that can used to cache the results of #fetchAuthToken.
If the value is empty, the auth token is not cached.
        
                            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 $httpHandler = null, string $accessToken = null)
        
    
    Get the project ID.