|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XsrfTokenService
To be used in scenarios where the XsrfTokenInterceptor
can not be applied.
The above mentioned XsrfTokenInterceptor
, configured in the default
stack, is the preferred
method for securing XWork controllers (actions) against XSRF abuse.
This service should be used for the following scenarios instead:
Content-Type: multipart/form-data
, as the underlying
MultiPartRequestWrapper
decoding the parts may escape on construction due to e.g. exceeding the maximum file
size. Since the token will be encoded in a part, the token check would fail thus hiding the root cause.
Method Summary | |
---|---|
com.atlassian.fugue.Pair<java.lang.String,java.lang.String> |
generate(javax.servlet.http.HttpServletRequest request)
Generate and bind a token pair to the session. |
com.atlassian.fugue.Maybe<Message> |
validate(javax.servlet.http.HttpServletRequest request)
Validate if the given request contains the token bound to the request's session. |
Method Detail |
---|
com.atlassian.fugue.Pair<java.lang.String,java.lang.String> generate(javax.servlet.http.HttpServletRequest request)
request
- the request used to identify the session, will be created if none is present
com.atlassian.fugue.Maybe<Message> validate(javax.servlet.http.HttpServletRequest request)
request
- the request used to identify the session and containing the token parameter
Maybe.isEmpty()
indicates a successful flow
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |