Interface ServerRequestCache
-
- All Known Implementing Classes:
NoOpServerRequestCache
,WebSessionServerRequestCache
public interface ServerRequestCache
Saves aServerHttpRequest
so it can be "replayed" later. This is useful for when a page was requested and authentication is necessary.- Since:
- 5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<java.net.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 providedServerWebExchange
matches the savedServerHttpRequest
gets the savedServerHttpRequest
reactor.core.publisher.Mono<java.lang.Void>
saveRequest(org.springframework.web.server.ServerWebExchange exchange)
Save theServerHttpRequest
-
-
-
Method Detail
-
saveRequest
reactor.core.publisher.Mono<java.lang.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<java.net.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 savedServerHttpRequest
from- 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 providedServerWebExchange
matches the savedServerHttpRequest
gets the savedServerHttpRequest
- Parameters:
exchange
- the exchange to obtain the request from- Returns:
- the
ServerHttpRequest
-
-