Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
SessionTokenStorage Class Reference
+ Inheritance diagram for SessionTokenStorage:

Public Member Functions

 __construct (string $key='_CSRF')
 
 set (string $id, string $token)
 Stores a CSRF token.
 
 get (string $id)
 Reads a stored CSRF token.
 
 exists (string $id)
 Checks whether a token with the given token ID exists.
 
 remove (string $id)
 Removes a CSRF token.
 

Protected Member Functions

 getKey ($id)
 

Protected Attributes

 $key = '_CSRF'
 

Detailed Description

Definition at line 6 of file SessionTokenStorage.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $key = '_CSRF')

Definition at line 14 of file SessionTokenStorage.php.

Member Function Documentation

◆ exists()

exists ( string  $id)

Checks whether a token with the given token ID exists.

Returns
bool Whether a token exists with the given ID

Implements TokenStorageInterface.

Definition at line 26 of file SessionTokenStorage.php.

◆ get()

get ( string  $id)

Reads a stored CSRF token.

Returns
string The stored token

Implements TokenStorageInterface.

Definition at line 22 of file SessionTokenStorage.php.

◆ getKey()

getKey (   $id)
protected

Definition at line 10 of file SessionTokenStorage.php.

◆ remove()

remove ( string  $id)

Removes a CSRF token.

Returns
string|null Returns the removed token if one existed, NULL otherwise

Implements TokenStorageInterface.

Definition at line 30 of file SessionTokenStorage.php.

◆ set()

set ( string  $id,
string  $token 
)

Stores a CSRF token.

Implements TokenStorageInterface.

Definition at line 18 of file SessionTokenStorage.php.

Field Documentation

◆ $key

$key = '_CSRF'
protected

Definition at line 8 of file SessionTokenStorage.php.


The documentation for this class was generated from the following file: