Class HttpSessionCsrfTokenRepository
java.lang.Object
com.codename1.backend.security.HttpSessionCsrfTokenRepository
- All Implemented Interfaces:
CsrfTokenRepository
Keeps the token in the HTTP session: the default. The token is sent to the
page masked and must come back masked, in the
X-CSRF-TOKEN header or the
_csrf form field.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateToken(HttpServer.Request request) A new token, not yet stored.loadToken(HttpServer.Request request) The stored token, or null when the client has none.voidsaveToken(CsrfToken token, HttpServer.Request request) Storestokenfor the client; null forgets the stored one.voidsetHeaderName(String headerName) voidsetParameterName(String parameterName)
-
Constructor Details
-
HttpSessionCsrfTokenRepository
public HttpSessionCsrfTokenRepository()
-
-
Method Details
-
setHeaderName
-
setParameterName
-
generateToken
Description copied from interface:CsrfTokenRepositoryA new token, not yet stored.- Specified by:
generateTokenin interfaceCsrfTokenRepository
-
saveToken
Description copied from interface:CsrfTokenRepositoryStorestokenfor the client; null forgets the stored one.- Specified by:
saveTokenin interfaceCsrfTokenRepository
-
loadToken
Description copied from interface:CsrfTokenRepositoryThe stored token, or null when the client has none.- Specified by:
loadTokenin interfaceCsrfTokenRepository
-