Class CsrfTokenArgumentResolver

  • All Implemented Interfaces:
    org.springframework.web.method.support.HandlerMethodArgumentResolver

    public final class CsrfTokenArgumentResolver
    extends java.lang.Object
    implements org.springframework.web.method.support.HandlerMethodArgumentResolver
    Allows resolving the current CsrfToken. For example, the following RestController will resolve the current CsrfToken:
     
     @RestController
     public class MyController {
         @MessageMapping("/im")
         public CsrfToken csrf(CsrfToken token) {
             return token;
         }
     }
      
    Since:
    4.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object resolveArgument​(org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory)  
      boolean supportsParameter​(org.springframework.core.MethodParameter parameter)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CsrfTokenArgumentResolver

        public CsrfTokenArgumentResolver()
    • Method Detail

      • supportsParameter

        public boolean supportsParameter​(org.springframework.core.MethodParameter parameter)
        Specified by:
        supportsParameter in interface org.springframework.web.method.support.HandlerMethodArgumentResolver
      • resolveArgument

        public java.lang.Object resolveArgument​(org.springframework.core.MethodParameter parameter,
                                                org.springframework.web.method.support.ModelAndViewContainer mavContainer,
                                                org.springframework.web.context.request.NativeWebRequest webRequest,
                                                org.springframework.web.bind.support.WebDataBinderFactory binderFactory)
        Specified by:
        resolveArgument in interface org.springframework.web.method.support.HandlerMethodArgumentResolver