public class CSRFHandler extends Object implements Handler<RoutingContext>
original
non RX-ified interface using Vert.x codegen.Constructor and Description |
---|
CSRFHandler(CSRFHandler delegate) |
Modifier and Type | Method and Description |
---|---|
static CSRFHandler |
create(String secret)
Instantiate a new CSRFHandlerImpl with a secret
|
Object |
getDelegate() |
void |
handle(RoutingContext arg0)
Something has happened, so handle it.
|
static CSRFHandler |
newInstance(CSRFHandler arg) |
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.
|
public CSRFHandler(CSRFHandler delegate)
public Object getDelegate()
public void handle(RoutingContext arg0)
Handler
handle
in interface Handler<RoutingContext>
arg0
- the event to handlepublic static CSRFHandler create(String secret)
CSRFHandler.create("s3cr37")
secret
- server secret to sign the token.public CSRFHandler setCookieName(String name)
name
- a new name for the cookie.public CSRFHandler setHeaderName(String name)
name
- a new name for the header.public CSRFHandler setNagHttps(boolean nag)
nag
- true to nagpublic CSRFHandler setTimeout(long timeout)
timeout
- token timeoutpublic static CSRFHandler newInstance(CSRFHandler arg)
Copyright © 2016. All rights reserved.