Package org.pac4j.core.engine
Class DefaultCallbackLogic
java.lang.Object
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionperform
(Config config, String inputDefaultUrl, Boolean inputRenewSession, String defaultClient, FrameworkParameters parameters) Perform the callback logic.protected HttpAction
redirectToOriginallyRequestedUrl
(CallContext ctx, String defaultUrl) redirectToOriginallyRequestedUrl.protected void
renewSession
(CallContext ctx, Config config) renewSession.protected void
saveUserProfile
(CallContext ctx, Config config, UserProfile profile, boolean saveProfileInSession, boolean multiProfile, boolean renewSession) saveUserProfile.Methods inherited from class org.pac4j.core.engine.AbstractExceptionAwareLogic
buildContext, handleException, runtimeException
-
Field Details
-
INSTANCE
ConstantINSTANCE
-
-
Constructor Details
-
DefaultCallbackLogic
public DefaultCallbackLogic()
-
-
Method Details
-
perform
public Object perform(Config config, String inputDefaultUrl, Boolean inputRenewSession, String defaultClient, FrameworkParameters parameters) Perform the callback logic.- Specified by:
perform
in interfaceCallbackLogic
- Parameters:
config
- the security configurationinputDefaultUrl
- the default urlinputRenewSession
- whether the session must be reneweddefaultClient
- the default clientparameters
- framework parameters- Returns:
- the resulting action of the callback
-
saveUserProfile
protected void saveUserProfile(CallContext ctx, Config config, UserProfile profile, boolean saveProfileInSession, boolean multiProfile, boolean renewSession) saveUserProfile.
- Parameters:
ctx
- aCallContext
objectconfig
- aConfig
objectprofile
- aUserProfile
objectsaveProfileInSession
- a booleanmultiProfile
- a booleanrenewSession
- a boolean
-
renewSession
renewSession.
- Parameters:
ctx
- aCallContext
objectconfig
- aConfig
object
-
redirectToOriginallyRequestedUrl
redirectToOriginallyRequestedUrl.
- Parameters:
ctx
- aCallContext
objectdefaultUrl
- aString
object- Returns:
- a
HttpAction
object
-