public interface ServerCsrfTokenRepository
CsrfToken
is
associated to the ServerWebExchange
. For example, it may be stored in
WebSession
.WebSessionServerCsrfTokenRepository
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<CsrfToken> |
generateToken(org.springframework.web.server.ServerWebExchange exchange)
Generates a
CsrfToken |
reactor.core.publisher.Mono<CsrfToken> |
loadToken(org.springframework.web.server.ServerWebExchange exchange)
Loads the expected
CsrfToken from the ServerWebExchange |
reactor.core.publisher.Mono<java.lang.Void> |
saveToken(org.springframework.web.server.ServerWebExchange exchange,
CsrfToken token)
Saves the
CsrfToken using the ServerWebExchange . |
reactor.core.publisher.Mono<CsrfToken> generateToken(org.springframework.web.server.ServerWebExchange exchange)
CsrfToken
exchange
- the ServerWebExchange
to useCsrfToken
that was generated. Cannot be null.reactor.core.publisher.Mono<java.lang.Void> saveToken(org.springframework.web.server.ServerWebExchange exchange, CsrfToken token)
CsrfToken
using the ServerWebExchange
. If the
CsrfToken
is null, it is the same as deleting it.exchange
- the ServerWebExchange
to usetoken
- the CsrfToken
to save or null to delete