@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).
| Constructor and Description |
|---|
CallbackController() |
| Modifier and Type | Method and Description |
|---|---|
void |
callback(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
callbackWithClientName(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String cn) |
org.pac4j.core.engine.CallbackLogic<Object,org.pac4j.core.context.J2EContext> |
getCallbackLogic() |
org.pac4j.core.config.Config |
getConfig() |
String |
getDefaultClient() |
String |
getDefaultUrl() |
Boolean |
getMultiProfile() |
Boolean |
getRenewSession() |
void |
setCallbackLogic(org.pac4j.core.engine.CallbackLogic<Object,org.pac4j.core.context.J2EContext> callbackLogic) |
void |
setConfig(org.pac4j.core.config.Config config) |
void |
setDefaultClient(String client) |
void |
setDefaultUrl(String defaultUrl) |
void |
setMultiProfile(Boolean multiProfile) |
void |
setRenewSession(Boolean renewSession) |
@RequestMapping(value="${pac4j.callback.path:/callback}")
public void callback(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${pac4j.callback.path/{cn}:/callback/{cn}}")
public void callbackWithClientName(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
@PathVariable(value="cn")
String cn)
public String getDefaultUrl()
public void setDefaultUrl(String defaultUrl)
public org.pac4j.core.engine.CallbackLogic<Object,org.pac4j.core.context.J2EContext> getCallbackLogic()
public void setCallbackLogic(org.pac4j.core.engine.CallbackLogic<Object,org.pac4j.core.context.J2EContext> callbackLogic)
public Boolean getMultiProfile()
public void setMultiProfile(Boolean multiProfile)
public Boolean getRenewSession()
public void setRenewSession(Boolean renewSession)
public String getDefaultClient()
public void setDefaultClient(String client)
public org.pac4j.core.config.Config getConfig()
public void setConfig(org.pac4j.core.config.Config config)
Copyright © 2018. All rights reserved.