csrf_Core Class Reference
CSRF helper class.
More...
Static Public Member Functions |
static | token ($force=false) |
| Generate new token Save token to session together with time for generation.
|
static | current_token_expired () |
| Checks if current token has expired.
|
static | valid ($token) |
| Validate token.
|
static | current_token () |
| Return current csrf token.
|
static | current_timestamp () |
| Return current csrf timestamp.
|
static | lifetime () |
| Return lifetime for current csrf token.
|
static | form_field ($name='') |
| Return a string representation of a form element with the current CSRF token.
|
Detailed Description
CSRF helper class.
Member Function Documentation
static csrf_Core::current_token_expired |
( |
|
) |
[static] |
Checks if current token has expired.
- Returns:
- boolean
static csrf_Core::form_field |
( |
$ |
name = '' |
) |
[static] |
Return a string representation of a form element with the current CSRF token.
- Parameters:
-
| $name | The name of the form element |
static csrf_Core::token |
( |
$ |
force = false |
) |
[static] |
Generate new token Save token to session together with time for generation.
- Returns:
- str $token
static csrf_Core::valid |
( |
$ |
token |
) |
[static] |
Validate token.
- Parameters:
-
- Returns:
- true if validation was successful, false otherwise
The documentation for this class was generated from the following file: