Property | Type | Description | |
---|---|---|---|
$post | Injected; defaults to references to superglobals | ||
$server | |||
$session |
Property | Type | Description | |
---|---|---|---|
$expire_old | boolean | ||
$formIndex | string | ||
$formToken | string | ||
$hashAlgo | string | ||
$hmac_ip | boolean | ||
$recycle_after | integer | ||
$sessionIndex | string |
Method | Description | |
---|---|---|
__construct ( array &$post = null, array &$session = null, array &$server = null ) | NULL is not a valid array type | |
getFormIndex ( ) : string | ||
getFormToken ( ) : string | ||
getSessionIndex ( ) : string | ||
getTokenArray ( string $lockTo = '' ) : array | 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 = [] ) : self | Use this to change the configuration settings. | |
validateRequest ( ) : boolean | Validate a request based on $this->session and $this->post data |
Method | Description | |
---|---|---|
generateToken ( string $lockTo ) : array | Generate, store, and return the index and token | |
noHTML ( string $untrusted ) : string | Wrapper for htmlentities() | |
recycleTokens ( ) : self | Enforce an upper limit on the number of tokens stored in session state by removing the oldest tokens first. |
protected generateToken ( string $lockTo ) : array | ||
$lockTo | string | What URI endpoint this is valid for |
return | array |
public getTokenArray ( string $lockTo = '' ) : array | ||
$lockTo | string | |
return | array |
public reconfigure ( array $options = [] ) : self | ||
$options | array | |
return | self |
protected recycleTokens ( ) : self | ||
return | self |
public validateRequest ( ) : boolean | ||
return | boolean |