interface FetchAuthTokenInterface (View source)

An interface implemented by objects that can fetch auth tokens.

Methods

array
fetchAuthToken(callable $httpHandler = null)

Fetches the auth tokens based on the current state.

string
getCacheKey()

Obtains a key that can used to cache the results of #fetchAuthToken.

null|array
getLastReceivedToken()

Returns an associative array with the token and expiration time.

Details

array fetchAuthToken(callable $httpHandler = null)

Fetches the auth tokens based on the current state.

Parameters

callable $httpHandler callback which delivers psr7 request

Return Value

array a hash of auth tokens

string getCacheKey()

Obtains a key that can used to cache the results of #fetchAuthToken.

If the value is empty, the auth token is not cached.

Return Value

string a key that may be used to cache the auth token.

null|array getLastReceivedToken()

Returns an associative array with the token and expiration time.

Return Value

null|array { The last received access token.