[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/phpbb/auth/provider/oauth/ -> token_storage.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 620 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

token_storage:: (24 methods):
  __construct()
  retrieveAccessToken()
  storeAccessToken()
  hasAccessToken()
  clearToken()
  clearAllTokens()
  storeAuthorizationState()
  hasAuthorizationState()
  retrieveAuthorizationState()
  clearAuthorizationState()
  clearAllAuthorizationStates()
  set_user_id()
  has_access_token_by_session()
  has_state_by_session()
  has_access_token()
  retrieve_access_token_by_session()
  retrieve_state_by_session()
  _retrieve_access_token()
  _retrieve_state()
  get_access_token_row()
  get_state_row()
  json_encode_token()
  json_decode_token()
  get_service_name_for_db()


Class: token_storage  - X-Ref

OAuth storage wrapper for phpBB's cache

__construct(\phpbb\db\driver\driver_interface $db, \phpbb\user $user, $oauth_token_table, $oauth_state_table)   X-Ref
Constructor.

param: \phpbb\db\driver\driver_interface    $db                    Database object
param: \phpbb\user                        $user                User object
param: string                            $oauth_token_table    OAuth table: token storage
param: string                            $oauth_state_table    OAuth table: state

retrieveAccessToken($service)   X-Ref
{@inheritdoc}


storeAccessToken($service, TokenInterface $token)   X-Ref
{@inheritdoc}


hasAccessToken($service)   X-Ref
{@inheritdoc}


clearToken($service)   X-Ref
{@inheritdoc}


clearAllTokens()   X-Ref
{@inheritdoc}


storeAuthorizationState($service, $state)   X-Ref
{@inheritdoc}


hasAuthorizationState($service)   X-Ref
{@inheritdoc}


retrieveAuthorizationState($service)   X-Ref
{@inheritdoc}


clearAuthorizationState($service)   X-Ref
{@inheritdoc}


clearAllAuthorizationStates()   X-Ref
{@inheritdoc}


set_user_id($user_id)   X-Ref
Updates the user_id field in the database associated with the token.

param: int        $user_id    The user identifier
return: void

has_access_token_by_session($service)   X-Ref
Checks to see if an access token exists solely by the session_id of the user.

param: string    $service    The OAuth service name
return: bool                    true if the user's access token exists,

has_state_by_session($service)   X-Ref
Checks to see if a state exists solely by the session_id of the user.

param: string    $service    The OAuth service name
return: bool                    true if the user's state exists,

has_access_token($data)   X-Ref
A helper function that performs the query for has access token functions.

param: array        $data        The SQL WHERE data
return: bool                    true if the user's access token exists,

retrieve_access_token_by_session($service)   X-Ref
A helper function that performs the query for retrieving access token functions by session.
Also checks if the token is a valid token.

param: string    $service    The OAuth service provider name
return: TokenInterface

retrieve_state_by_session($service)   X-Ref
A helper function that performs the query for retrieving state functions by session.

param: string    $service    The OAuth service provider name
return: string                The OAuth state

_retrieve_access_token($data)   X-Ref
A helper function that performs the query for retrieve access token functions.
Also checks if the token is a valid token.

param: array        $data        The SQL WHERE data
return: TokenInterface

_retrieve_state($data)   X-Ref
A helper function that performs the query for retrieve state functions.

param: array        $data        The SQL WHERE data
return: string                The OAuth state

get_access_token_row($data)   X-Ref
A helper function that performs the query for retrieving an access token.

param: array        $data        The SQL WHERE data
return: array|false            array with the OAuth token row,

get_state_row($data)   X-Ref
A helper function that performs the query for retrieving a state.

param: array        $data        The SQL WHERE data
return: array|false            array with the OAuth state row,

json_encode_token(TokenInterface $token)   X-Ref
A helper function that JSON encodes a TokenInterface's data.

param: TokenInterface    $token
return: string                    The json encoded TokenInterface's data

json_decode_token($json)   X-Ref
A helper function that JSON decodes a data string and creates a TokenInterface.

param: string    $json            The json encoded TokenInterface's data
return: TokenInterface

get_service_name_for_db($provider)   X-Ref
Returns the service name as it must be stored in the database.

param: string    $provider    The OAuth provider name
return: string                The OAuth service name



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1