Class CsrfTokenArgumentResolver
- java.lang.Object
-
- org.springframework.security.web.method.annotation.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 currentCsrfToken
. For example, the followingRestController
will resolve the currentCsrfToken
:@RestController public class MyController { @MessageMapping("/im") public CsrfToken csrf(CsrfToken token) { return token; } }
- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description CsrfTokenArgumentResolver()
-
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)
-
-
-
Method Detail
-
supportsParameter
public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
- Specified by:
supportsParameter
in interfaceorg.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 interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver
-
-