Detailed Description
AuthTokenSession is a DefaultSession, but additionally requires clients to send a token in the X-Auth-Token request header (Double Submit Cookie).
The token is created, when the authenticated user is associated with the session and send to the client in a cookie named application-title-token.
Definition at line 28 of file AuthTokenSession.php.
Public Member Functions | |
__construct (Configuration $configuration) | |
getHeaderName () | |
getCookieName () | |
setAuthUser ($login) | |
getAuthUser () | |
Public Member Functions inherited from DefaultSession | |
__destruct () | |
isStarted () | |
getID () | |
get ($key, $default=null) | |
set ($key, $value) | |
remove ($key) | |
exist ($key) | |
clear () | |
destroy () | |
Public Attributes | |
const | TOKEN_HEADER = 'X-Auth-Token' |
Public Attributes inherited from DefaultSession | |
const | AUTH_USER_NAME = 'auth_user' |
Protected Member Functions | |
isTokenValid () | |
Protected Member Functions inherited from DefaultSession | |
getCookiePrefix () | |
Constructor & Destructor Documentation
◆ __construct()
__construct | ( | Configuration | $configuration | ) |
Constructor.
- Parameters
-
$configuration
Reimplemented from DefaultSession.
Definition at line 39 of file AuthTokenSession.php.
Member Function Documentation
◆ getHeaderName()
getHeaderName | ( | ) |
Implements TokenBasedSession.
Definition at line 48 of file AuthTokenSession.php.
◆ getCookieName()
getCookieName | ( | ) |
Reimplemented from DefaultSession.
Definition at line 55 of file AuthTokenSession.php.
◆ setAuthUser()
setAuthUser | ( | $login | ) |
- See also
- Session::setAuthUser()
Reimplemented from DefaultSession.
Definition at line 62 of file AuthTokenSession.php.
◆ getAuthUser()
getAuthUser | ( | ) |
- See also
- Session::getAuthUser()
Reimplemented from DefaultSession.
Definition at line 85 of file AuthTokenSession.php.
◆ isTokenValid()
|
protected |
Check if the request contains a valid token.
Definition at line 93 of file AuthTokenSession.php.
Member Data Documentation
◆ TOKEN_HEADER
const TOKEN_HEADER = 'X-Auth-Token' |
Definition at line 30 of file AuthTokenSession.php.