Package org.pac4j.springframework.web
Class CallbackController
java.lang.Object
org.pac4j.springframework.web.CallbackController
This controller finishes the login process for an indirect client.
- Since:
- 1.0.0
- Author:
- Jerome Leleu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcallback(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handle the callback.voidcallbackWithClientName(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String cn) Handle the callback (client name in path).org.pac4j.core.engine.CallbackLogicGet the specific callback logic.org.pac4j.core.config.ConfigGet the security config.Get the default client.Get the default URL.Indicate whether the session should be renewed.voidsetCallbackLogic(org.pac4j.core.engine.CallbackLogic callbackLogic) Set the specific callback logic.voidsetConfig(org.pac4j.core.config.Config config) Define the security config.voidsetDefaultClient(String client) Define the default client (in case, none is requested on the callback URL).voidsetDefaultUrl(String defaultUrl) Set the default URL.voidsetRenewSession(Boolean renewSession) Define whether the session should be renewed.
-
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 requestresponse- 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 requestresponse- the HTTP responsecn- the client name
-
getDefaultUrl
Get the default URL.- Returns:
- the default URL
-
setDefaultUrl
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
Indicate whether the session should be renewed.- Returns:
- whether the session should be renewed
-
setRenewSession
Define whether the session should be renewed.- Parameters:
renewSession- whether the session should be renewed
-
getDefaultClient
Get the default client.- Returns:
- the default client
-
setDefaultClient
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
-