Class LogoutController

java.lang.Object
org.pac4j.springframework.web.LogoutController

@Controller public class LogoutController extends Object

This controller handles the (application + identity provider) logout process.

Since:
1.0.0
Author:
Jerome Leleu
  • Constructor Details

    • LogoutController

      public LogoutController()
  • Method Details

    • logout

      @RequestMapping("${pac4j.logout.path:/logout}") public void logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Handle the logout process.
      Parameters:
      request - the HTTP request
      response - the HTTP response
    • getDefaultUrl

      public String getDefaultUrl()
      Get the default URL.
      Returns:
      the default URL
    • setDefaultUrl

      public void setDefaultUrl(String defaultUrl)
      Set the default URL.
      Parameters:
      defaultUrl - the default URL
    • getLogoutUrlPattern

      public String getLogoutUrlPattern()
      Get the logout URL pattern.
      Returns:
      the logout URL pattern
    • setLogoutUrlPattern

      public void setLogoutUrlPattern(String logoutUrlPattern)
      Set the logout URL pattern.
      Parameters:
      logoutUrlPattern - the logout URL pattern
    • getLogoutLogic

      public org.pac4j.core.engine.LogoutLogic getLogoutLogic()
      Get the specific logout logic.
      Returns:
      the logout logic
    • setLogoutLogic

      public void setLogoutLogic(org.pac4j.core.engine.LogoutLogic logoutLogic)
      Set the specific logout logic.
      Parameters:
      logoutLogic - the logout logic
    • getConfig

      public org.pac4j.core.config.Config getConfig()
      Get the security config.
      Returns:
      the config
    • setConfig

      public void setConfig(org.pac4j.core.config.Config config)
      Define the security config.
      Parameters:
      config - the config
    • getLocalLogout

      public Boolean getLocalLogout()
      Get whether it is a local logout.
      Returns:
      whether it is a local logout
    • setLocalLogout

      public void setLocalLogout(Boolean localLogout)
      Define whether it is a local logout.
      Parameters:
      localLogout - whether it is a local logout
    • getCentralLogout

      public Boolean getCentralLogout()
      Get whether it is a central logout.
      Returns:
      whether it is a central logout
    • setCentralLogout

      public void setCentralLogout(Boolean centralLogout)
      Define whether it is a central logout.
      Parameters:
      centralLogout - whether it is a central logout
    • getDestroySession

      public Boolean getDestroySession()
      Get whether the session shoudl be destroyed at logout.
      Returns:
      whether the session shoudl be destroyed
    • setDestroySession

      public void setDestroySession(Boolean destroySession)
      Define whether the session shoudl be destroyed at logout.
      Parameters:
      destroySession - whether the session shoudl be destroyed