NativeSessionTokenStorage
class NativeSessionTokenStorage implements TokenStorageInterface
Token storage that uses PHP's native session handling.
Constants
SESSION_NAMESPACE |
The namespace used to store values in the session. |
Methods
__construct(string $namespace = self::SESSION_NAMESPACE)
Initializes the storage with a session namespace.
string
getToken(string $tokenId)
Reads a stored CSRF token.
setToken(string $tokenId, string $token)
Stores a CSRF token.
bool
hasToken(string $tokenId)
Checks whether a token with the given token ID exists.
string|null
removeToken(string $tokenId)
Removes a CSRF token.
Details
at line line 48
__construct(string $namespace = self::SESSION_NAMESPACE)
Initializes the storage with a session namespace.
at line line 56
string
getToken(string $tokenId)
Reads a stored CSRF token.
at line line 72
setToken(string $tokenId, string $token)
Stores a CSRF token.
at line line 84
bool
hasToken(string $tokenId)
Checks whether a token with the given token ID exists.
at line line 96
string|null
removeToken(string $tokenId)
Removes a CSRF token.