TokenStorageInterface
interface TokenStorageInterface
interface TokenStorageInterface
Methods
Store the values of the access token when it is succefully retrieved from the OAuth provider.
Retrieve the OAuth access token if it was already previously stored by the storeAccessToken method.
Reset the access token to a state back when the user has not yet authorized the access to the OAuth provider API.
Returns the stored state
Returns the stored nonce
Stores the user ID returned by the OAuth provider
Returns the stored user ID
Details
at line 34
bool
storeAccessToken(array $accessToken)
Store the values of the access token when it is succefully retrieved from the OAuth provider.
This method is meant to be only be called from inside the class.
Actual implementations should create a sub-class and override this function to make the access token values be stored in other types of containers, like for instance databases.
at line 53
array|bool
getStoredAccessToken()
Retrieve the OAuth access token if it was already previously stored by the storeAccessToken method.
This method is meant to be only be called from inside the class.
Actual implementations should create a sub-class and override this method to retrieve the access token values from other types of containers, like for instance databases.
at line 74
bool
resetAccessToken()
Reset the access token to a state back when the user has not yet authorized the access to the OAuth provider API.
Call this method if for some reason the token to access the API was revoked and you need to ask the user to authorize the access again.
This method must be called when the user is accessing your site pages, so it can reset the information stored in session variables that cache the state of a previously retrieved access token.
Actual implementations should create a sub-class and override this method to reset the access token state when it is stored in other types of containers, like for instance databases.
at line 81
string|null
getStoredState()
Returns the stored state
at line 88
string|null
getStoredNonce()
Returns the stored nonce
at line 95
storeUserid(string $userId)
Stores the user ID returned by the OAuth provider
at line 102
string|null
getStoredUserId()
Returns the stored user ID