Interface ServerCsrfTokenRequestHandler
- All Superinterfaces:
- ServerCsrfTokenRequestResolver
- All Known Implementing Classes:
- ServerCsrfTokenRequestAttributeHandler,- XorServerCsrfTokenRequestAttributeHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface ServerCsrfTokenRequestHandler
extends ServerCsrfTokenRequestResolver
A callback interface that is used to make the 
CsrfToken created by the
 ServerCsrfTokenRepository available as an exchange attribute. Implementations
 of this interface may choose to perform additional tasks or customize how the token is
 made available to the application through exchange attributes.- Since:
- 5.8
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionvoidhandle(org.springframework.web.server.ServerWebExchange exchange, reactor.core.publisher.Mono<CsrfToken> csrfToken) Handles a request using aCsrfToken.default reactor.core.publisher.Mono<String>resolveCsrfTokenValue(org.springframework.web.server.ServerWebExchange exchange, CsrfToken csrfToken) Returns the token value resolved from the providedServerWebExchangeandCsrfTokenorMono.empty()if not available.
- 
Method Details- 
handlevoid handle(org.springframework.web.server.ServerWebExchange exchange, reactor.core.publisher.Mono<CsrfToken> csrfToken) Handles a request using aCsrfToken.- Parameters:
- exchange- the- ServerWebExchangewith the request being handled
- csrfToken- the- Mono<CsrfToken>created by the- ServerCsrfTokenRepository
 
- 
resolveCsrfTokenValuedefault reactor.core.publisher.Mono<String> resolveCsrfTokenValue(org.springframework.web.server.ServerWebExchange exchange, CsrfToken csrfToken) Description copied from interface:ServerCsrfTokenRequestResolverReturns the token value resolved from the providedServerWebExchangeandCsrfTokenorMono.empty()if not available.- Specified by:
- resolveCsrfTokenValuein interface- ServerCsrfTokenRequestResolver
- Parameters:
- exchange- the- ServerWebExchangewith the request being processed
- csrfToken- the- CsrfTokencreated by the- ServerCsrfTokenRepository
- Returns:
- the token value resolved from the request
 
 
-