Class RedirectServerAuthenticationEntryPoint
- java.lang.Object
-
- org.springframework.security.web.server.authentication.RedirectServerAuthenticationEntryPoint
-
- All Implemented Interfaces:
ServerAuthenticationEntryPoint
public class RedirectServerAuthenticationEntryPoint extends java.lang.Object implements ServerAuthenticationEntryPoint
Performs a redirect to a specified location.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description RedirectServerAuthenticationEntryPoint(java.lang.String location)Creates an instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<java.lang.Void>commence(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.core.AuthenticationException ex)Initiates the authentication flowvoidsetRedirectStrategy(ServerRedirectStrategy redirectStrategy)Sets the RedirectStrategy to use.voidsetRequestCache(ServerRequestCache requestCache)The request cache to use to save the request before sending a redirect.
-
-
-
Method Detail
-
setRequestCache
public void setRequestCache(ServerRequestCache requestCache)
The request cache to use to save the request before sending a redirect.- Parameters:
requestCache- the cache to redirect to.
-
commence
public reactor.core.publisher.Mono<java.lang.Void> commence(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.core.AuthenticationException ex)Description copied from interface:ServerAuthenticationEntryPointInitiates the authentication flow- Specified by:
commencein interfaceServerAuthenticationEntryPoint- Returns:
Mono<Void>to indicate when the request for authentication is complete
-
setRedirectStrategy
public void setRedirectStrategy(ServerRedirectStrategy redirectStrategy)
Sets the RedirectStrategy to use.- Parameters:
redirectStrategy- the strategy to use. Default is DefaultRedirectStrategy.
-
-