public final class CsrfTokenArgumentResolver extends Object implements HandlerMethodArgumentResolver
CsrfToken
. For example, the following
RestController
will resolve the current CsrfToken
:
@RestController
public class MyController {
@MessageMapping("/im")
public CsrfToken csrf(CsrfToken token) {
return token;
}
}
Constructor and Description |
---|
CsrfTokenArgumentResolver() |
Modifier and Type | Method and Description |
---|---|
Object |
resolveArgument(MethodParameter parameter,
ModelAndViewContainer mavContainer,
NativeWebRequest webRequest,
WebDataBinderFactory binderFactory) |
boolean |
supportsParameter(MethodParameter parameter) |
public boolean supportsParameter(MethodParameter parameter)
supportsParameter
in interface HandlerMethodArgumentResolver
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception
resolveArgument
in interface HandlerMethodArgumentResolver
Exception