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 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::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:
$token The csrf token
Returns:
true if validation was successful, false otherwise

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 7 May 2013 for ninja by  doxygen 1.6.1