Interface ServerRequestCache
- All Known Implementing Classes:
 CookieServerRequestCache,NoOpServerRequestCache,WebSessionServerRequestCache
public interface ServerRequestCache
Saves a 
ServerHttpRequest so it can be "replayed" later. This is useful for
 when a page was requested and authentication is necessary.- Since:
 - 5.0
 
- 
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<URI>getRedirectUri(org.springframework.web.server.ServerWebExchange exchange) Get the URI that can be redirected to trigger the saved request to be usedreactor.core.publisher.Mono<org.springframework.http.server.reactive.ServerHttpRequest>removeMatchingRequest(org.springframework.web.server.ServerWebExchange exchange) If the providedServerWebExchangematches the savedServerHttpRequestgets the savedServerHttpRequestreactor.core.publisher.Mono<Void>saveRequest(org.springframework.web.server.ServerWebExchange exchange) Save theServerHttpRequest 
- 
Method Details
- 
saveRequest
reactor.core.publisher.Mono<Void> saveRequest(org.springframework.web.server.ServerWebExchange exchange) Save theServerHttpRequest- Parameters:
 exchange- the exchange to save- Returns:
 - Return a 
Mono<Void>which only replays complete and error signals from thisMono. 
 - 
getRedirectUri
reactor.core.publisher.Mono<URI> getRedirectUri(org.springframework.web.server.ServerWebExchange exchange) Get the URI that can be redirected to trigger the saved request to be used- Parameters:
 exchange- the exchange to obtain the savedServerHttpRequestfrom- Returns:
 - the URI that can be redirected to trigger the saved request to be used
 
 - 
removeMatchingRequest
reactor.core.publisher.Mono<org.springframework.http.server.reactive.ServerHttpRequest> removeMatchingRequest(org.springframework.web.server.ServerWebExchange exchange) If the providedServerWebExchangematches the savedServerHttpRequestgets the savedServerHttpRequest- Parameters:
 exchange- the exchange to obtain the request from- Returns:
 - the 
ServerHttpRequest 
 
 -