Reference documentation and code samples for the Google Auth Library Client class IAMCredentials.
Authenticates requests using IAM credentials.
Namespace
Google \ Auth \ CredentialsMethods
__construct
Parameters | |
---|---|
Name | Description |
selector |
string
the IAM selector |
token |
string
the IAM token |
getUpdateMetadataFunc
export a callback function which updates runtime metadata.
Returns | |
---|---|
Type | Description |
callable |
updateMetadata function |
updateMetadata
Updates metadata with the appropriate header metadata.
Parameters | |
---|---|
Name | Description |
metadata |
array
metadata hashmap |
unusedAuthUri |
string
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 |
Returns | |
---|---|
Type | Description |
array |
updated metadata hashmap |
Constants
SELECTOR_KEY
Value: 'x-goog-iam-authority-selector'
TOKEN_KEY
Value: 'x-goog-iam-authorization-token'