Class DefaultServerRedirectStrategy
java.lang.Object
org.springframework.security.web.server.DefaultServerRedirectStrategy
- All Implemented Interfaces:
ServerRedirectStrategy
The default
ServerRedirectStrategy
to use.- Since:
- 5.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
sendRedirect
(org.springframework.web.server.ServerWebExchange exchange, URI location) Performs a redirect based upon the providedServerWebExchange
andURI
void
setContextRelative
(boolean contextRelative) Sets if the location is relative to the context.void
setHttpStatus
(org.springframework.http.HttpStatus httpStatus) TheHttpStatus
to use for the redirect.
-
Constructor Details
-
DefaultServerRedirectStrategy
public DefaultServerRedirectStrategy()
-
-
Method Details
-
sendRedirect
public reactor.core.publisher.Mono<Void> sendRedirect(org.springframework.web.server.ServerWebExchange exchange, URI location) Description copied from interface:ServerRedirectStrategy
Performs a redirect based upon the providedServerWebExchange
andURI
- Specified by:
sendRedirect
in interfaceServerRedirectStrategy
- Parameters:
exchange
- theServerWebExchange
to uselocation
- the location to redirect to- Returns:
Mono<Void>
to indicate when redirect is complete
-
setHttpStatus
public void setHttpStatus(org.springframework.http.HttpStatus httpStatus) TheHttpStatus
to use for the redirect.- Parameters:
httpStatus
- the status to use. Cannot be null
-
setContextRelative
public void setContextRelative(boolean contextRelative) Sets if the location is relative to the context.- Parameters:
contextRelative
- if redirects should be relative to the context. Default is true.
-