Class OidcClientInitiatedLogoutSuccessHandler

  • All Implemented Interfaces:
    org.springframework.security.web.authentication.logout.LogoutSuccessHandler

    public final class OidcClientInitiatedLogoutSuccessHandler
    extends org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
    A logout success handler for initiating OIDC logout through the user agent.
    Since:
    5.2
    See Also:
    RP-Initiated Logout, LogoutSuccessHandler
    • Field Summary

      • Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected java.lang.String determineTargetUrl​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)  
      void setPostLogoutRedirectUri​(java.lang.String postLogoutRedirectUri)
      Set the post logout redirect uri template to use.
      void setPostLogoutRedirectUri​(java.net.URI postLogoutRedirectUri)
      • Methods inherited from class org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler

        onLogoutSuccess
      • Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler

        determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OidcClientInitiatedLogoutSuccessHandler

        public OidcClientInitiatedLogoutSuccessHandler​(ClientRegistrationRepository clientRegistrationRepository)
    • Method Detail

      • determineTargetUrl

        protected java.lang.String determineTargetUrl​(javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response,
                                                      org.springframework.security.core.Authentication authentication)
        Overrides:
        determineTargetUrl in class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
      • setPostLogoutRedirectUri

        @Deprecated
        public void setPostLogoutRedirectUri​(java.net.URI postLogoutRedirectUri)
        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 to use. Supports the "{baseUrl}" placeholder, for example:
                handler.setPostLogoutRedirectUri("{baseUrl}");
         
        will make so that post_logout_redirect_uri will be set to the base url for the client application.
        Parameters:
        postLogoutRedirectUri - - A template for creating the post_logout_redirect_uri query parameter
        Since:
        5.3