Class OidcClientInitiatedServerLogoutSuccessHandler
- java.lang.Object
-
- org.springframework.security.oauth2.client.oidc.web.server.logout.OidcClientInitiatedServerLogoutSuccessHandler
-
- All Implemented Interfaces:
ServerLogoutSuccessHandler
public class OidcClientInitiatedServerLogoutSuccessHandler extends java.lang.Object implements ServerLogoutSuccessHandler
A reactive logout success handler for initiating OIDC logout through the user agent.- Since:
- 5.2
- See Also:
- RP-Initiated Logout,
ServerLogoutSuccessHandler
-
-
Constructor Summary
Constructors Constructor Description OidcClientInitiatedServerLogoutSuccessHandler(ReactiveClientRegistrationRepository clientRegistrationRepository)
Constructs anOidcClientInitiatedServerLogoutSuccessHandler
with the provided parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description reactor.core.publisher.Mono<java.lang.Void>
onLogoutSuccess(WebFilterExchange exchange, Authentication authentication)
Invoked after log out was successfulvoid
setLogoutSuccessUrl(java.net.URI logoutSuccessUrl)
The URL to redirect to after successfully logging out when not originally an OIDC loginvoid
setPostLogoutRedirectUri(java.lang.String postLogoutRedirectUri)
Set the post logout redirect uri template.void
setPostLogoutRedirectUri(java.net.URI postLogoutRedirectUri)
Deprecated.
-
-
-
Constructor Detail
-
OidcClientInitiatedServerLogoutSuccessHandler
public OidcClientInitiatedServerLogoutSuccessHandler(ReactiveClientRegistrationRepository clientRegistrationRepository)
Constructs anOidcClientInitiatedServerLogoutSuccessHandler
with the provided parameters- Parameters:
clientRegistrationRepository
- TheReactiveClientRegistrationRepository
to use to derive the end_session_endpoint value
-
-
Method Detail
-
onLogoutSuccess
public reactor.core.publisher.Mono<java.lang.Void> onLogoutSuccess(WebFilterExchange exchange, Authentication authentication)
Description copied from interface:ServerLogoutSuccessHandler
Invoked after log out was successful- Specified by:
onLogoutSuccess
in interfaceServerLogoutSuccessHandler
- Parameters:
exchange
- the exchangeauthentication
- theAuthentication
- Returns:
- a completion notification (success or error)
-
setPostLogoutRedirectUri
@Deprecated public void setPostLogoutRedirectUri(java.net.URI postLogoutRedirectUri)
Deprecated.Set the post logout redirect uri to use- Parameters:
postLogoutRedirectUri
- - A valid URL to which the OP should redirect after logging out the user
-
setPostLogoutRedirectUri
public void setPostLogoutRedirectUri(java.lang.String postLogoutRedirectUri)
Set the post logout redirect uri template.
The supported uri template variables are:{baseScheme}
,{baseHost}
,{basePort}
and{basePath}
.
NOTE:{baseUrl}
is also supported, which is the same as"{baseScheme}://{baseHost}{basePort}{basePath}"
handler.setPostLogoutRedirectUri("{baseUrl}");
will make so thatpost_logout_redirect_uri
will be set to the base url for the client application.- Parameters:
postLogoutRedirectUri
- - A template for creating thepost_logout_redirect_uri
query parameter- Since:
- 5.3
-
setLogoutSuccessUrl
public void setLogoutSuccessUrl(java.net.URI logoutSuccessUrl)
The URL to redirect to after successfully logging out when not originally an OIDC login- Parameters:
logoutSuccessUrl
- the url to redirect to. Default is "/login?logout".
-
-