Class CallbackController


  • @Controller
    public class CallbackController
    extends Object

    This controller finishes the login process for an indirect client, based on the callbackLogic.

    The configuration can be defined via property keys: pac4j.callback.defaultUrl (default url after login if none was requested), pac4j.callback.multiProfile (whether multiple profiles should be kept) and pac4j.callback.renewSession (whether the session must be renewed after login). pac4j.callback.path (the URL path to the callback controller that will receive the redirection request).

    Or it can be defined via setter methods: setDefaultUrl(String), setMultiProfile(Boolean) and (setRenewSession(Boolean).

    Since:
    1.0.0
    Author:
    Jerome Leleu
    • Constructor Detail

      • CallbackController

        public CallbackController()
    • Method Detail

      • callback

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

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

        public String getDefaultUrl()
      • setDefaultUrl

        public void setDefaultUrl​(String defaultUrl)
      • getCallbackLogic

        public org.pac4j.core.engine.CallbackLogic<Object,​org.pac4j.core.context.JEEContext> getCallbackLogic()
      • setCallbackLogic

        public void setCallbackLogic​(org.pac4j.core.engine.CallbackLogic<Object,​org.pac4j.core.context.JEEContext> callbackLogic)
      • getMultiProfile

        public Boolean getMultiProfile()
      • setMultiProfile

        public void setMultiProfile​(Boolean multiProfile)
      • getRenewSession

        public Boolean getRenewSession()
      • setRenewSession

        public void setRenewSession​(Boolean renewSession)
      • getDefaultClient

        public String getDefaultClient()
      • setDefaultClient

        public void setDefaultClient​(String client)
      • getConfig

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

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