|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CsrfTokenRepository
An API to allow changing the method in which the expected CsrfToken
is associated to the HttpServletRequest
. For example, it may be
stored in HttpSession
.
HttpSessionCsrfTokenRepository
Method Summary | |
---|---|
CsrfToken |
generateAndSaveToken(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Generates and saves the expected CsrfToken |
CsrfToken |
loadToken(javax.servlet.http.HttpServletRequest request)
Loads the expected CsrfToken from the HttpServletRequest |
void |
saveToken(CsrfToken token,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Saves the CsrfToken using the HttpServletRequest and
HttpServletResponse . |
Method Detail |
---|
CsrfToken generateAndSaveToken(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
CsrfToken
request
- the HttpServletRequest
to useresponse
- the HttpServletResponse
to use
CsrfToken
that was generated and saved. Cannot be
null.void saveToken(CsrfToken token, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
CsrfToken
using the HttpServletRequest
and
HttpServletResponse
. If the CsrfToken
is null, it is the
same as deleting it.
token
- the CsrfToken
to save or null to deleterequest
- the HttpServletRequest
to useresponse
- the HttpServletResponse
to useCsrfToken loadToken(javax.servlet.http.HttpServletRequest request)
CsrfToken
from the HttpServletRequest
request
- the HttpServletRequest
to use
CsrfToken
or null if none exists
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |