token_storage
class token_storage implements TokenStorageInterface
OAuth storage wrapper for phpBB's cache
Properties
protected driver_interface | $db | ||
protected user | $user | ||
protected string | $oauth_token_table | ||
protected string | $oauth_state_table | ||
protected TokenInterface | $cachedToken | ||
protected string | $cachedState |
Methods
Constructor.
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
Updates the user_id field in the database associated with the token.
Checks to see if an access token exists solely by the session_id of the user.
Checks to see if a state exists solely by the session_id of the user.
A helper function that performs the query for has access token functions.
A helper function that performs the query for retrieving access token functions by session.
A helper function that performs the query for retrieving state functions by session.
A helper function that performs the query for retrieve access token functions.
A helper function that performs the query for retrieve state functions.
A helper function that performs the query for retrieving an access token.
A helper function that performs the query for retrieving a state.
A helper function that JSON encodes a TokenInterface's data.
A helper function that JSON decodes a data string and creates a TokenInterface.
Returns the service name as it must be stored in the database.
Details
at line 53
__construct(driver_interface $db, user $user, string $oauth_token_table, string $oauth_state_table)
Constructor.
at line 65
retrieveAccessToken($service)
{@inheritdoc}
at line 90
storeAccessToken($service, TokenInterface $token)
{@inheritdoc}
at line 132
hasAccessToken($service)
{@inheritdoc}
at line 157
clearToken($service)
{@inheritdoc}
at line 180
clearAllTokens()
{@inheritdoc}
at line 200
storeAuthorizationState($service, $state)
{@inheritdoc}
at line 222
hasAuthorizationState($service)
{@inheritdoc}
at line 247
retrieveAuthorizationState($service)
{@inheritdoc}
at line 272
clearAuthorizationState($service)
{@inheritdoc}
at line 295
clearAllAuthorizationStates()
{@inheritdoc}
at line 318
void
set_user_id(int $user_id)
Updates the user_id field in the database associated with the token.
at line 343
bool
has_access_token_by_session(string $service)
Checks to see if an access token exists solely by the session_id of the user.
at line 367
bool
has_state_by_session(string $service)
Checks to see if a state exists solely by the session_id of the user.
at line 391
protected bool
has_access_token(array $data)
A helper function that performs the query for has access token functions.
at line 404
TokenInterface
retrieve_access_token_by_session(string $service)
A helper function that performs the query for retrieving access token functions by session.
Also checks if the token is a valid token.
at line 428
string
retrieve_state_by_session(string $service)
A helper function that performs the query for retrieving state functions by session.
at line 453
protected TokenInterface
_retrieve_access_token(array $data)
A helper function that performs the query for retrieve access token functions.
Also checks if the token is a valid token.
at line 484
protected string
_retrieve_state(array $data)
A helper function that performs the query for retrieve state functions.
at line 505
protected array|false
get_access_token_row(array $data)
A helper function that performs the query for retrieving an access token.
at line 524
protected array|false
get_state_row(array $data)
A helper function that performs the query for retrieving a state.
at line 542
string
json_encode_token(TokenInterface $token)
A helper function that JSON encodes a TokenInterface's data.
at line 571
TokenInterface
json_decode_token(string $json)
A helper function that JSON decodes a data string and creates a TokenInterface.
at line 610
protected string
get_service_name_for_db(string $provider)
Returns the service name as it must be stored in the database.