static COREPOS\pos\lib\FormLib::clearTokens |
( |
| ) |
|
|
static |
Drop all cached tokens
- Returns
- [boolean] true
static COREPOS\pos\lib\FormLib::generateToken |
( |
| ) |
|
|
static |
Create a unique token and store it in cache
- Returns
- [string] token
static COREPOS\pos\lib\FormLib::setToken |
( |
|
$token | ) |
|
|
static |
Store token in cache
- Returns
- [boolean] true
static COREPOS\pos\lib\FormLib::tokenField |
( |
|
$name = 'crsfToken' | ) |
|
|
static |
Get a hidden <input> with a valid token value
- Parameters
-
$name | [string, default crsfToken] name of form field |
- Returns
- [string] html field
static COREPOS\pos\lib\FormLib::validateToken |
( |
|
$name = 'crsfToken' | ) |
|
|
static |
Validate submitted token
- Parameters
-
$name | [string, default crsfToken] name of form field |
- Returns
- [boolean]
Tokens are one-time-use. Upon validation, that token is removed from the cache
The documentation for this class was generated from the following file:
- pos/is4c-nf/lib/FormLib.php