Property | Type | Description | |
---|---|---|---|
$expireOld | boolean | ||
$hmacIP | Default to FALSE to be friendly to Tor/Mobile users | ||
$recycleAfter | integer | ||
$sessionIndex | string |
Method | Description | |
---|---|---|
__construct ( array $options = [] ) | CSRF constructor. | |
check ( ) : boolean | Validate a request based on $_SESSION and $_POST data | |
getTokenString ( string $lockTo = '' ) : string | Retrieve a token array for unit testing endpoints | |
insertToken ( string $lockTo = '', boolean $echo = true ) : string | Insert a CSRF token to a form | |
reconfigure ( array $options = [] ) | Use this to change the configuration settings. |
Method | Description | |
---|---|---|
generateToken ( string $lockTo = '' ) : array | Generate, store, and return the index and token | |
recycleTokens ( ) | Enforce an upper limit on the number of tokens stored in session state by removing the oldest tokens first. |
public __construct ( array $options = [] ) | ||
$options | array |
protected generateToken ( string $lockTo = '' ) : array | ||
$lockTo | string | What URI endpoint this is valid for |
return | array | [string, string] |
public getTokenString ( string $lockTo = '' ) : string | ||
$lockTo | string | - Only get tokens locked to a particular form |
return | string |
public reconfigure ( array $options = [] ) | ||
$options | array |
protected recycleTokens ( ) |