Package org.pac4j.springframework.web
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, 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) andpac4j.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 Summary
Constructors Constructor Description CallbackController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.JEEContext>
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.JEEContext> 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)
-
-
-
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)
-
-