프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$expireOld | boolean | ||
$hmacIP | Default to FALSE to be friendly to Tor/Mobile users | ||
$recycleAfter | integer | ||
$sessionIndex | string |
메소드 | 설명 | |
---|---|---|
__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. |
메소드 | 설명 | |
---|---|---|
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. |
protected generateToken ( string $lockTo = '' ) : array | ||
$lockTo | string | What URI endpoint this is valid for |
리턴 | array | [string, string] |
public getTokenString ( string $lockTo = '' ) : string | ||
$lockTo | string | - Only get tokens locked to a particular form |
리턴 | string |
public reconfigure ( array $options = [] ) | ||
$options | array |
protected recycleTokens ( ) |