class IAMCredentials (View source)

Authenticates requests using IAM credentials.

Constants

SELECTOR_KEY

TOKEN_KEY

Methods

__construct(string $selector, string $token)

No description

callable
getUpdateMetadataFunc()

export a callback function which updates runtime metadata.

array
updateMetadata(array $metadata, string $unusedAuthUri = null, callable $httpHandler = null)

Updates metadata with the appropriate header metadata.

Details

__construct(string $selector, string $token)

No description

Parameters

string $selector

the IAM selector

string $token

the IAM token

callable getUpdateMetadataFunc()

export a callback function which updates runtime metadata.

Return Value

callable

updateMetadata function

array updateMetadata(array $metadata, string $unusedAuthUri = null, callable $httpHandler = null)

Updates metadata with the appropriate header metadata.

Parameters

array $metadata

metadata hashmap

string $unusedAuthUri

optional auth uri

callable $httpHandler

callback which delivers psr7 request Note: this param is unused here, only included here for consistency with other credentials class

Return Value

array

updated metadata hashmap