Package google.registry.security
Class XsrfTokenManager
java.lang.Object
google.registry.security.XsrfTokenManager
Helper class for generating and validate XSRF tokens.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateToken
(String email) Generates an XSRF token for a given user based on email address.boolean
validateToken
(String email, String token) Validates an XSRF token against the current logged-in user.
-
Field Details
-
X_CSRF_TOKEN
HTTP header or cookie name used for transmitting XSRF tokens.- See Also:
-
P_CSRF_TOKEN
POST parameter used for transmitting XSRF tokens.- See Also:
-
-
Constructor Details
-
XsrfTokenManager
-
-
Method Details
-
generateToken
Generates an XSRF token for a given user based on email address. -
validateToken
Validates an XSRF token against the current logged-in user.
-