Class CallbackController

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

@Controller public class CallbackController extends Object

This controller finishes the login process for an indirect client.

Since:
1.0.0
Author:
Jerome Leleu
  • Constructor Details

    • CallbackController

      public CallbackController()
  • Method Details

    • callback

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

      @RequestMapping("${pac4j.callback.path/{cn}:/callback/{cn}}") public void callbackWithClientName(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, @PathVariable("cn") String cn)
      Handle the callback (client name in path).
      Parameters:
      request - the HTTP request
      response - the HTTP response
      cn - the client name
    • 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
    • getCallbackLogic

      public org.pac4j.core.engine.CallbackLogic getCallbackLogic()
      Get the specific callback logic.
      Returns:
      the callback logic.
    • setCallbackLogic

      public void setCallbackLogic(org.pac4j.core.engine.CallbackLogic callbackLogic)
      Set the specific callback logic.
      Parameters:
      callbackLogic - the callback logic
    • getRenewSession

      public Boolean getRenewSession()
      Indicate whether the session should be renewed.
      Returns:
      whether the session should be renewed
    • setRenewSession

      public void setRenewSession(Boolean renewSession)
      Define whether the session should be renewed.
      Parameters:
      renewSession - whether the session should be renewed
    • getDefaultClient

      public String getDefaultClient()
      Get the default client.
      Returns:
      the default client
    • setDefaultClient

      public void setDefaultClient(String client)
      Define the default client (in case, none is requested on the callback URL).
      Parameters:
      client - the default client
    • 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