FetchAuthTokenInterface
in
An interface implemented by objects that can fetch auth tokens.
Table of Contents
Methods
- fetchAuthToken() : array<string|int, mixed>
- Fetches the auth tokens based on the current state.
- getCacheKey() : string
- Obtains a key that can used to cache the results of #fetchAuthToken.
- getLastReceivedToken() : null|array<string|int, mixed>
- Returns an associative array with the token and expiration time.
Methods
fetchAuthToken()
Fetches the auth tokens based on the current state.
public
fetchAuthToken([callable $httpHandler = null ]) : array<string|int, mixed>
Parameters
- $httpHandler : callable = null
-
callback which delivers psr7 request
Return values
array<string|int, mixed> —a hash of auth tokens
getCacheKey()
Obtains a key that can used to cache the results of #fetchAuthToken.
public
getCacheKey() : string
If the value is empty, the auth token is not cached.
Return values
string —a key that may be used to cache the auth token.
getLastReceivedToken()
Returns an associative array with the token and expiration time.
public
getLastReceivedToken() : null|array<string|int, mixed>
Return values
null|array<string|int, mixed> —{ The last received access token.