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 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveArgument
(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)
-
Constructor Details
-
CsrfTokenArgumentResolver
public CsrfTokenArgumentResolver()
-
-
Method Details
-
supportsParameter
public boolean supportsParameter(org.springframework.core.MethodParameter parameter) - Specified by:
supportsParameter
in interfaceorg.springframework.web.method.support.HandlerMethodArgumentResolver
-
resolveArgument
public 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
-