This handler adds a CSRF token to requests which mutate state. In order change the state a (XSRF-TOKEN) cookie is set with a unique token, that is expected to be sent back in a (X-XSRF-TOKEN) header.
The behavior is to check the request body header and cookie for validity.
This Handler requires session support, thus should be added somewhere below Session and Body handlers.
package |
Default |
---|
__construct()
create( $arg0) : \io\vertx\jphp\ext\web\handler\CSRFHandler
handle( $arg0) : void
RoutingContext
setCookieName( $arg0) : $this
string
$this
fluent
setCookiePath( $arg0) : $this
string
$this
fluent
setHeaderName( $arg0) : $this
string
$this
fluent
setNagHttps( $arg0) : $this
boolean
$this
fluent
setResponseBody( $arg0) : $this
string
$this
fluent
setTimeout( $arg0) : $this
integer
$this
fluent
DEFAULT_COOKIE_NAME
var |
php文件只是为了写代码方便,常量的实际值请参考原java文件 |
---|
DEFAULT_COOKIE_PATH
var |
php文件只是为了写代码方便,常量的实际值请参考原java文件 |
---|
DEFAULT_HEADER_NAME
var |
php文件只是为了写代码方便,常量的实际值请参考原java文件 |
---|
DEFAULT_RESPONSE_BODY
var |
php文件只是为了写代码方便,常量的实际值请参考原java文件 |
---|