interface TokenStorageInterface
Stores CSRF tokens.
string | getToken(string $tokenId) Reads a stored CSRF token. | |
setToken(string $tokenId, string $token) Stores a CSRF token. | ||
string|null | removeToken(string $tokenId) Removes a CSRF token. | |
bool | hasToken(string $tokenId) Checks whether a token with the given token ID exists. |
Reads a stored CSRF token.
string | $tokenId | The token ID |
string | The stored token |
TokenNotFoundException | If the token ID does not exist |
Stores a CSRF token.
string | $tokenId | The token ID |
string | $token | The CSRF token |
Removes a CSRF token.
string | $tokenId | The token ID |
string|null | Returns the removed token if one existed, NULL otherwise |
Checks whether a token with the given token ID exists.
string | $tokenId | The token ID |
bool | Whether a token exists with the given ID |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.html