Package com.google.gwt.user.server.rpc
Class XsrfProtectedServiceServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
com.google.gwt.user.server.rpc.RemoteServiceServlet
com.google.gwt.user.server.rpc.AbstractXsrfProtectedServiceServlet
com.google.gwt.user.server.rpc.XsrfProtectedServiceServlet
- All Implemented Interfaces:
- SerializationPolicyProvider,- Serializable,- javax.servlet.Servlet,- javax.servlet.ServletConfig
EXPERIMENTAL and subject to change. Do not use this in production code.
 
The servlet base class for RPC service implementations using default XSRF protection tied to authentication session cookie.
 XSRF token validation is performed by generating MD5 hash of the session
 cookie and comparing supplied XsrfToken with the generated hash.
 Session cookie name is specified by the "gwt.xsrf.session_cookie_name"
 context parameter in web.xml.
 
 XsrfTokenService can be used by
 clients to obtain XsrfTokens that will pass validation performed by
 this class.
 
- See Also:
- 
Field SummaryFieldsFields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServletperThreadRequest, perThreadResponse
- 
Constructor SummaryConstructorsConstructorDescriptionXsrfProtectedServiceServlet(Object delegate) XsrfProtectedServiceServlet(Object delegate, String sessionCookieName) XsrfProtectedServiceServlet(String sessionCookieName) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidinit()protected voidvalidateXsrfToken(RpcToken token, Method method) ValidatesXsrfTokenincluded withRPCRequestagainst XSRF cookie.Methods inherited from class com.google.gwt.user.server.rpc.AbstractXsrfProtectedServiceServletonAfterRequestDeserialized, shouldValidateXsrfTokenMethods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServletcheckPermutationStrongName, doGetSerializationPolicy, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, loadSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponseMethods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServletdoPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, readContentMethods inherited from class javax.servlet.http.HttpServletdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServletdestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
- 
Field Details- 
sessionCookieNameString sessionCookieName
 
- 
- 
Constructor Details- 
XsrfProtectedServiceServletpublic XsrfProtectedServiceServlet()
- 
XsrfProtectedServiceServlet
- 
XsrfProtectedServiceServlet
- 
XsrfProtectedServiceServlet
 
- 
- 
Method Details- 
initpublic void init() throws javax.servlet.ServletException- Overrides:
- initin class- javax.servlet.GenericServlet
- Throws:
- javax.servlet.ServletException
 
- 
validateXsrfTokenValidatesXsrfTokenincluded withRPCRequestagainst XSRF cookie.- Specified by:
- validateXsrfTokenin class- AbstractXsrfProtectedServiceServlet
- Parameters:
- token-- RpcTokenincluded with an RPC request.
- method- method being invoked via this RPC call.
- Throws:
- RpcTokenException- if token verification failed.
 
 
-