Package org.springframework.security.web.method.annotation

# 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

Constructors
Constructor
Description
`CsrfTokenArgumentResolver()`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### CsrfTokenArgumentResolver

public CsrfTokenArgumentResolver()

## Method Details

### supportsParameter

public boolean supportsParameter(org.springframework.core.MethodParameter parameter)

Specified by:
  `supportsParameter` in interface `org.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 interface `org.springframework.web.method.support.HandlerMethodArgumentResolver`