Class CheckCSRF<S,U>
- java.lang.Object
-
- org.rootservices.otter.security.csrf.between.CheckCSRF<S,U>
-
-
Constructor Summary
Constructors Constructor Description CheckCSRF(java.lang.String cookieName, java.lang.String formFieldName, DoubleSubmitCSRF doubleSubmitCSRF)CheckCSRF(DoubleSubmitCSRF doubleSubmitCSRF)
-
Method Summary
Modifier and Type Method Description java.lang.StringgetCookieName()DoubleSubmitCSRFgetDoubleSubmitCSRF()java.lang.StringgetFormFieldName()protected voidonHalt(HaltException e, Response response)This method will be called before a Halt Exception is thrown.voidprocess(Method method, Request<S,U> request, Response<S> response)voidsetCookieName(java.lang.String cookieName)voidsetDoubleSubmitCSRF(DoubleSubmitCSRF doubleSubmitCSRF)voidsetFormFieldName(java.lang.String formFieldName)
-
-
-
Constructor Detail
-
CheckCSRF
public CheckCSRF(DoubleSubmitCSRF doubleSubmitCSRF)
-
CheckCSRF
public CheckCSRF(java.lang.String cookieName, java.lang.String formFieldName, DoubleSubmitCSRF doubleSubmitCSRF)
-
-
Method Detail
-
process
public void process(Method method, Request<S,U> request, Response<S> response) throws HaltException
- Specified by:
processin interfaceBetween<S,U>- Throws:
HaltException
-
onHalt
protected void onHalt(HaltException e, Response response)
This method will be called before a Halt Exception is thrown. Override this method if you wish to change the behavior on the response right before a Halt Exception is going to be thrown. An Example would be, you may want to redirect the user to a login page.- Parameters:
e- a HaltExceptionresponse- a Response
-
getCookieName
public java.lang.String getCookieName()
-
setCookieName
public void setCookieName(java.lang.String cookieName)
-
getFormFieldName
public java.lang.String getFormFieldName()
-
setFormFieldName
public void setFormFieldName(java.lang.String formFieldName)
-
getDoubleSubmitCSRF
public DoubleSubmitCSRF getDoubleSubmitCSRF()
-
setDoubleSubmitCSRF
public void setDoubleSubmitCSRF(DoubleSubmitCSRF doubleSubmitCSRF)
-
-