public class DefaultCallbackLogic<R,C extends WebContext> extends AbstractExceptionAwareLogic<R,C> implements CallbackLogic<R,C>
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
).
logger
Constructor and Description |
---|
DefaultCallbackLogic() |
Modifier and Type | Method and Description |
---|---|
ClientFinder |
getClientFinder() |
R |
perform(C context,
Config config,
HttpActionAdapter<R,C> httpActionAdapter,
String inputDefaultUrl,
Boolean inputSaveInSession,
Boolean inputMultiProfile,
Boolean inputRenewSession,
String client)
Perform the callback logic.
|
protected HttpAction |
redirectToOriginallyRequestedUrl(C context,
String defaultUrl) |
protected void |
renewSession(C context,
Config config) |
protected void |
saveUserProfile(C context,
Config config,
CommonProfile profile,
boolean saveInSession,
boolean multiProfile,
boolean renewSession) |
void |
setClientFinder(ClientFinder clientFinder) |
String |
toString() |
getErrorUrl, handleException, runtimeException, setErrorUrl
getProfileManager, getProfileManagerFactory, setProfileManagerFactory
public R perform(C context, Config config, HttpActionAdapter<R,C> httpActionAdapter, String inputDefaultUrl, Boolean inputSaveInSession, Boolean inputMultiProfile, Boolean inputRenewSession, String client)
CallbackLogic
perform
in interface CallbackLogic<R,C extends WebContext>
context
- the web contextconfig
- the security configurationhttpActionAdapter
- the HTTP action adapterinputDefaultUrl
- the default urlinputSaveInSession
- whether profile should be saved in sessioninputMultiProfile
- whether multi profiles are supportedinputRenewSession
- whether the session must be renewedclient
- the default clientprotected void saveUserProfile(C context, Config config, CommonProfile profile, boolean saveInSession, boolean multiProfile, boolean renewSession)
protected HttpAction redirectToOriginallyRequestedUrl(C context, String defaultUrl)
public ClientFinder getClientFinder()
public void setClientFinder(ClientFinder clientFinder)
Copyright © 2019. All rights reserved.