UpdateMetadataTrait
trait UpdateMetadataTrait (View source)
internal |
Provides shared methods for updating request metadata (request headers).
Should implement {\Google\Auth\UpdateMetadataInterface} and {\Google\Auth\FetchAuthTokenInterface}.
Traits
Trait containing helper methods required for enabling observability metrics in the library.
Properties
static protected string | $metricMetadataKey | from MetricsTrait |
Methods
static string
getMetricsHeader(string $credType = '', string $authRequestType = '')
No description
from
MetricsTrait
array
applyTokenEndpointMetrics(array $metadata, string $authRequestType)
No description
from
MetricsTrait
callable
array
updateMetadata(array $metadata, string $authUri = null, callable|null $httpHandler = null)
Updates metadata with the authorization token.
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.