Copied!

Authenticates requests using IAM credentials.

CloneableInstantiable
Constants
public Google\Auth\Credentials\IAMCredentials::SELECTOR_KEY = 'x-goog-iam-authority-selector'
public Google\Auth\Credentials\IAMCredentials::TOKEN_KEY = 'x-goog-iam-authorization-token'
Methods
public __construct( $selector, $token)
 
  • param string $selector the IAM selector
  • param string $token the IAM token
public getUpdateMetadataFunc()
 

export a callback function which updates runtime metadata.

  • return callable updateMetadata function
public updateMetadata( $metadata, $unusedAuthUri = NULL, ?callable $httpHandler = NULL)
 

Updates metadata with the appropriate header metadata.

  • param mixed[] $metadata metadata hashmap
  • param string $unusedAuthUri optional auth uri
  • param callable|null $httpHandler callback which delivers psr7 request Note: this param is unused here, only included here for consistency with other credentials class
  • return mixed[] updated metadata hashmap
Properties
private $selector = NULL
 
  • var string
private $token = NULL
 
  • var string
© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration