Example usage for com.google.gwt.user.server Util isMethodXsrfProtected

List of usage examples for com.google.gwt.user.server Util isMethodXsrfProtected

Introduction

In this page you can find the example usage for com.google.gwt.user.server Util isMethodXsrfProtected.

Prototype

public static boolean isMethodXsrfProtected(Method method, Class<? extends Annotation> xsrfAnnotation,
        Class<? extends Annotation> noXsrfAnnotation, Class<?> xsrfTokenInterface) 

Source Link

Document

Checks if specified method is XSRF protected based on the following logic:
  • Method level annotations override class level annotations.

    Usage

    From source file:de.itsvs.cwtrpc.controller.token.DefaultXsrfTokenService.java

    License:Apache License

    public boolean shouldValidateToken(HttpServletRequest servletRequest, RPCRequest rpcRequest) {
        return Util.isMethodXsrfProtected(rpcRequest.getMethod(), XsrfProtect.class, NoXsrfProtect.class,
                RpcToken.class);
    }