web\Request getCsrfToken()

getCsrfToken() public method

Returns the token used to perform CSRF validation.

This token is generated in a way to prevent BREACH attacks. It may be passed along via a hidden field of an HTML form or an HTTP header value to support CSRF validation.

public string getCsrfToken ( $regenerate = false )
$regenerate boolean

Whether to regenerate CSRF token. When this parameter is true, each time this method is called, a new CSRF token will be generated and persisted (in session or cookie).

return string

The token used to perform CSRF validation.

doc_Yii
2016-10-30 17:15:46
Comments
Leave a Comment

Please login to continue.