Package org.pac4j.core.engine
Class DefaultCallbackLogic
java.lang.Object
org.pac4j.core.profile.factory.ProfileManagerFactoryAware
org.pac4j.core.engine.AbstractExceptionAwareLogic
org.pac4j.core.engine.DefaultCallbackLogic
- All Implemented Interfaces:
CallbackLogic
Default callback logic:
The credentials are extracted from the current request to fetch the user profile (from the identity provider) which is then saved in
the web session. Finally, the user is redirected back to the originally requested url (or to the defaultUrl).
- Since:
- 1.9.0
- Author:
- Jerome Leleu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionperform(WebContext webContext, SessionStore sessionStore, Config config, HttpActionAdapter httpActionAdapter, String inputDefaultUrl, Boolean inputRenewSession, String defaultClient) Perform the callback logic.protected HttpActionredirectToOriginallyRequestedUrl(WebContext context, SessionStore sessionStore, String defaultUrl) protected voidrenewSession(WebContext context, SessionStore sessionStore, Config config) protected voidsaveUserProfile(WebContext context, SessionStore sessionStore, Config config, UserProfile profile, boolean saveProfileInSession, boolean multiProfile, boolean renewSession) voidsetClientFinder(ClientFinder clientFinder) voidsetSavedRequestHandler(SavedRequestHandler savedRequestHandler) toString()Methods inherited from class org.pac4j.core.engine.AbstractExceptionAwareLogic
getErrorUrl, handleException, runtimeException, setErrorUrlMethods inherited from class org.pac4j.core.profile.factory.ProfileManagerFactoryAware
getProfileManager, getProfileManagerFactory, setProfileManagerFactory
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DefaultCallbackLogic
public DefaultCallbackLogic()
-
-
Method Details
-
perform
public Object perform(WebContext webContext, SessionStore sessionStore, Config config, HttpActionAdapter httpActionAdapter, String inputDefaultUrl, Boolean inputRenewSession, String defaultClient) Description copied from interface:CallbackLogicPerform the callback logic.- Specified by:
performin interfaceCallbackLogic- Parameters:
webContext- the web contextsessionStore- the session storeconfig- the security configurationhttpActionAdapter- the HTTP action adapterinputDefaultUrl- the default urlinputRenewSession- whether the session must be reneweddefaultClient- the default client- Returns:
- the resulting action of the callback
-
saveUserProfile
protected void saveUserProfile(WebContext context, SessionStore sessionStore, Config config, UserProfile profile, boolean saveProfileInSession, boolean multiProfile, boolean renewSession) -
renewSession
-
redirectToOriginallyRequestedUrl
protected HttpAction redirectToOriginallyRequestedUrl(WebContext context, SessionStore sessionStore, String defaultUrl) -
getClientFinder
-
setClientFinder
-
getSavedRequestHandler
-
setSavedRequestHandler
-
toString
-