Documentation

IAMCredentials
in package

Authenticates requests using IAM credentials.

Table of Contents

SELECTOR_KEY  = 'x-goog-iam-authority-selector'
TOKEN_KEY  = 'x-goog-iam-authorization-token'
$selector  : string
$token  : string
__construct()  : mixed
getUpdateMetadataFunc()  : array<string|int, mixed>
export a callback function which updates runtime metadata.
updateMetadata()  : array<string|int, mixed>
Updates metadata with the appropriate header metadata.

Constants

SELECTOR_KEY

public mixed SELECTOR_KEY = 'x-goog-iam-authority-selector'

TOKEN_KEY

public mixed TOKEN_KEY = 'x-goog-iam-authorization-token'

Properties

Methods

__construct()

public __construct( $selector,  $token) : mixed
Parameters
$selector :

string the IAM selector

$token :

string the IAM token

Return values
mixed

getUpdateMetadataFunc()

export a callback function which updates runtime metadata.

public getUpdateMetadataFunc() : array<string|int, mixed>
Return values
array<string|int, mixed>

updateMetadata function

updateMetadata()

Updates metadata with the appropriate header metadata.

public updateMetadata(array<string|int, mixed> $metadata[, string $unusedAuthUri = null ][, callable $httpHandler = null ]) : array<string|int, mixed>
Parameters
$metadata : array<string|int, mixed>

metadata hashmap

$unusedAuthUri : string = null

optional auth uri

$httpHandler : callable = null

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

Return values
array<string|int, mixed>

updated metadata hashmap

Search results