Reference documentation and code samples for the Google Auth Library Client class UserRefreshCredentials.
Authenticates requests using User Refresh credentials.
This class allows authorizing requests from user refresh tokens.
This the end of the result of a 3LO flow. E.g, the end result of 'gcloud auth login' saves a file with these contents in well known location
Namespace
Google \ Auth \ CredentialsMethods
__construct
Create a new UserRefreshCredentials.
scope
string|string[]|null
the scope of the access request, expressed either as an Array or as a space-delimited String.
jsonKey
string|array
JSON credential file path or JSON credentials as an associative array
targetAudience
string|null
The audience for the ID token.
fetchAuthToken
Fetches the auth tokens based on the current state.
httpHandler
callable|null
headers
array
[optional] Metrics headers to be inserted into the token endpoint request present. This could be passed from ImersonatedServiceAccountCredentials as it uses UserRefreshCredentials as source credentials.
array
getCacheKey
Return the Cache Key for the credentials.
The format for the Cache key is one of the following: ClientId.Scope ClientId.Audience
string
getLastReceivedToken
Returns an associative array with the token and expiration time.
array
getQuotaProject
Get the quota project used for this API request
string|null
getGrantedScope
Get the granted scopes (if they exist) for the last fetched token.
string|null