CORE POS - IS4C
The CORE POS front end
Static Public Member Functions | List of all members
COREPOS\pos\lib\FormLib Class Reference
Inheritance diagram for COREPOS\pos\lib\FormLib:

Static Public Member Functions

static validateToken ($name='crsfToken')
 
static clearTokens ()
 
static setToken ($token)
 
static generateToken ()
 
static tokenField ($name='crsfToken')
 

Member Function Documentation

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: