Class AbstractXsrfProtectedServiceServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
All Implemented Interfaces:
SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
XsrfProtectedServiceServlet

public abstract class AbstractXsrfProtectedServiceServlet extends RemoteServiceServlet
An abstract class for XSRF protected RPC service implementations, which decides if XSRF protection should be enforced on a method invocation based on the following logic:
  • RPC interface or method can be annotated with either XsrfProtect or NoXsrfProtect annotation to enable or disable XSRF protection on all methods of an RPC interface or a single method correspondingly.
  • RPC interface level annotation can be overridden by a method level annotation.
  • If no annotations are present and RPC interface contains method that returns RpcToken or its implementation, then XSRF token validation is performed on all methods of that interface except for the method returning RpcToken.
See Also: