Class OidcClientInitiatedLogoutSuccessHandler
java.lang.Object
org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
org.springframework.security.oauth2.client.oidc.web.logout.OidcClientInitiatedLogoutSuccessHandler
- All Implemented Interfaces:
LogoutSuccessHandler
A logout success handler for initiating OIDC logout through the user agent.
- Since:
- 5.2
- See Also:
-
Field Summary
Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
logger -
Constructor Summary
ConstructorsConstructorDescriptionOidcClientInitiatedLogoutSuccessHandler(ClientRegistrationRepository clientRegistrationRepository) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdetermineTargetUrl(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) Builds the target URL according to the logic defined in the main class JavadocvoidsetPostLogoutRedirectUri(String postLogoutRedirectUri) Set the post logout redirect uri template.Methods inherited from class org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
onLogoutSuccessMethods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
-
Constructor Details
-
OidcClientInitiatedLogoutSuccessHandler
public OidcClientInitiatedLogoutSuccessHandler(ClientRegistrationRepository clientRegistrationRepository)
-
-
Method Details
-
determineTargetUrl
protected String determineTargetUrl(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) Description copied from class:AbstractAuthenticationTargetUrlRequestHandlerBuilds the target URL according to the logic defined in the main class Javadoc- Overrides:
determineTargetUrlin classAbstractAuthenticationTargetUrlRequestHandler
-
setPostLogoutRedirectUri
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_uriwill be set to the base url for the client application.- Parameters:
postLogoutRedirectUri- - A template for creating thepost_logout_redirect_uriquery parameter- Since:
- 5.3
-