Documentation

IAMCredentials
in package

Authenticates requests using IAM credentials.

Table of Contents

Constants

SELECTOR_KEY  = 'x-goog-iam-authority-selector'
TOKEN_KEY  = 'x-goog-iam-authorization-token'

Properties

$selector  : string
$token  : string

Methods

__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(mixed $selector, mixed $token) : mixed
Parameters
$selector : mixed

string the IAM selector

$token : mixed

string the IAM token

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

Loading…
On this page

Search results