class IAMCredentials (View source)

Authenticates requests using IAM credentials.

Constants

SELECTOR_KEY

TOKEN_KEY

Methods

__construct($selector, $token)

No description

array
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($selector, $token)

No description

Parameters

$selector

string the IAM selector

$token

string the IAM token

array getUpdateMetadataFunc()

export a callback function which updates runtime metadata.

Return Value

array

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