Class LogoutController


  • @Controller
    public class LogoutController
    extends Object

    This controller handles the (application + identity provider) logout process, based on the logoutLogic.

    The configuration can be provided via property keys: pac4j.logout.defaultUrl (default logourl url), pac4j.logout.logoutUrlPattern (pattern that logout urls must match), pac4j.logout.localLogout (whether the application logout must be performed) pac4j.logout.destroySession (whether we must destroy the web session during the local logout), pac4j.logout.centralLogout (whether the centralLogout must be performed). pac4j.logout.path (the URL path to the logout controller).

    Or it can be defined via setter methods: setDefaultUrl(String), setLogoutUrlPattern(String), setLocalLogout(Boolean), setDestroySession(Boolean) and setCentralLogout(Boolean).

    Since:
    1.0.0
    Author:
    Jerome Leleu
    • Constructor Detail

      • LogoutController

        public LogoutController()
    • Method Detail

      • logout

        @RequestMapping("${pac4j.logout.path:/logout}")
        public void logout​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
      • getDefaultUrl

        public String getDefaultUrl()
      • setDefaultUrl

        public void setDefaultUrl​(String defaultUrl)
      • getLogoutUrlPattern

        public String getLogoutUrlPattern()
      • setLogoutUrlPattern

        public void setLogoutUrlPattern​(String logoutUrlPattern)
      • getLogoutLogic

        public org.pac4j.core.engine.LogoutLogic<Object,​org.pac4j.core.context.JEEContext> getLogoutLogic()
      • setLogoutLogic

        public void setLogoutLogic​(org.pac4j.core.engine.LogoutLogic<Object,​org.pac4j.core.context.JEEContext> logoutLogic)
      • getConfig

        public org.pac4j.core.config.Config getConfig()
      • setConfig

        public void setConfig​(org.pac4j.core.config.Config config)
      • getLocalLogout

        public Boolean getLocalLogout()
      • setLocalLogout

        public void setLocalLogout​(Boolean localLogout)
      • getCentralLogout

        public Boolean getCentralLogout()
      • setCentralLogout

        public void setCentralLogout​(Boolean centralLogout)
      • getDestroySession

        public Boolean getDestroySession()
      • setDestroySession

        public void setDestroySession​(Boolean destroySession)