Class RedirectServerAuthenticationEntryPoint
java.lang.Object
org.springframework.security.web.server.authentication.RedirectServerAuthenticationEntryPoint
- All Implemented Interfaces:
ServerAuthenticationEntryPoint
public class RedirectServerAuthenticationEntryPoint
extends Object
implements ServerAuthenticationEntryPoint
Performs a redirect to a specified location.
- Since:
- 5.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
commence
(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.core.AuthenticationException ex) Initiates the authentication flowvoid
setRedirectStrategy
(ServerRedirectStrategy redirectStrategy) Sets the RedirectStrategy to use.void
setRequestCache
(ServerRequestCache requestCache) The request cache to use to save the request before sending a redirect.
-
Constructor Details
-
RedirectServerAuthenticationEntryPoint
Creates an instance- Parameters:
location
- the location to redirect to (i.e. "/logout-success")
-
-
Method Details
-
setRequestCache
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<Void> commence(org.springframework.web.server.ServerWebExchange exchange, org.springframework.security.core.AuthenticationException ex) Description copied from interface:ServerAuthenticationEntryPoint
Initiates the authentication flow- Specified by:
commence
in interfaceServerAuthenticationEntryPoint
- Returns:
Mono<Void>
to indicate when the request for authentication is complete
-
setRedirectStrategy
Sets the RedirectStrategy to use.- Parameters:
redirectStrategy
- the strategy to use. Default is DefaultRedirectStrategy.
-