Class DefaultServerRedirectStrategy
- java.lang.Object
-
- org.springframework.security.web.server.DefaultServerRedirectStrategy
-
- All Implemented Interfaces:
ServerRedirectStrategy
public class DefaultServerRedirectStrategy extends java.lang.Object implements ServerRedirectStrategy
The defaultServerRedirectStrategyto use.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description DefaultServerRedirectStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<java.lang.Void>sendRedirect(org.springframework.web.server.ServerWebExchange exchange, java.net.URI location)Performs a redirect based upon the providedServerWebExchangeandURIvoidsetContextRelative(boolean contextRelative)Sets if the location is relative to the context.voidsetHttpStatus(org.springframework.http.HttpStatus httpStatus)TheHttpStatusto use for the redirect.
-
-
-
Method Detail
-
sendRedirect
public reactor.core.publisher.Mono<java.lang.Void> sendRedirect(org.springframework.web.server.ServerWebExchange exchange, java.net.URI location)Description copied from interface:ServerRedirectStrategyPerforms a redirect based upon the providedServerWebExchangeandURI- Specified by:
sendRedirectin interfaceServerRedirectStrategy- Parameters:
exchange- theServerWebExchangeto uselocation- the location to redirect to- Returns:
Mono<Void>to indicate when redirect is complete
-
setHttpStatus
public void setHttpStatus(org.springframework.http.HttpStatus httpStatus)
TheHttpStatusto 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.
-
-