public interface CSRFHandler extends Handler<RoutingContext>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_COOKIE_NAME |
static String |
DEFAULT_HEADER_NAME |
Modifier and Type | Method and Description |
---|---|
static CSRFHandler |
create(String secret)
Instantiate a new CSRFHandlerImpl with a secret
|
CSRFHandler |
setCookieName(String name)
Set the cookie name.
|
CSRFHandler |
setHeaderName(String name)
Set the header name.
|
CSRFHandler |
setNagHttps(boolean nag)
Should the handler give warning messages if this handler is used in other than https protocols?
|
CSRFHandler |
setTimeout(long timeout)
Set the timeout for tokens generated by the handler, by default it uses the default from the session handler.
|
static final String DEFAULT_COOKIE_NAME
static final String DEFAULT_HEADER_NAME
static CSRFHandler create(String secret)
CSRFHandler.create("s3cr37")
secret
- server secret to sign the token.CSRFHandler setCookieName(String name)
name
- a new name for the cookie.CSRFHandler setHeaderName(String name)
name
- a new name for the header.CSRFHandler setNagHttps(boolean nag)
nag
- true to nagCSRFHandler setTimeout(long timeout)
timeout
- token timeoutCopyright © 2016. All rights reserved.