Reference documentation and code samples for the Google API Core Client class CredentialsWrapper.
The CredentialsWrapper object provides a wrapper around a FetchAuthTokenInterface.
Namespace
Google \ ApiCoreMethods
__construct
CredentialsWrapper constructor.
credentialsFetcher
Google\Auth\FetchAuthTokenInterface
A credentials loader used to fetch access tokens.
authHttpHandler
callable
A handler used to deliver PSR-7 requests
specifically for authentication. Should match a signature of function (RequestInterface $request, array $options) : ResponseInterface
.
universeDomain
string
getQuotaProject
string|null
getProjectId
httpHandler
?callable
getBearerString
string
getAuthorizationHeaderCallback
audience
string
optional audience for self-signed JWTs.
callable
checkUniverseDomain
Verify that the expected universe domain matches the universe domain from the credentials.
static::build
Factory method to create a CredentialsWrapper from an array of options.
args
array
An array of optional arguments.
↳ keyFile
string|array
Credentials to be used. Accepts either a path to a credentials file, or a decoded credentials file as a PHP array. If this is not specified, application default credentials will be used.
↳ scopes
string[]
A string array of scopes to use when acquiring credentials.
↳ authHttpHandler
callable
A handler used to deliver PSR-7 requests specifically for authentication. Should match a signature of function (RequestInterface $request, array $options) : ResponseInterface
.
↳ enableCaching
bool
Enable caching of access tokens. Defaults to true.
↳ authCache
CacheItemPoolInterface
A cache for storing access tokens. Defaults to a simple in memory implementation.
↳ authCacheOptions
array
Cache configuration options.
↳ quotaProject
string
Specifies a user project to bill for access charges associated with the request.
↳ defaultScopes
string[]
A string array of default scopes to use when acquiring credentials.
↳ useJwtAccessWithScope
bool
Ensures service account credentials use JWT Access (also known as self-signed JWTs), even when user-defined scopes are supplied.
universeDomain
string
The expected universe of the credentials. Defaults to "googleapis.com"