public class DefaultCallbackLogic<R,C extends WebContext> extends Object 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
).
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
DefaultCallbackLogic() |
Modifier and Type | Method and Description |
---|---|
protected ProfileManager |
getProfileManager(C context)
Given a webcontext generate a profileManager for it.
|
Function<C,ProfileManager> |
getProfileManagerFactory() |
R |
perform(C context,
Config config,
HttpActionAdapter<R,C> httpActionAdapter,
String inputDefaultUrl,
Boolean inputMultiProfile,
Boolean inputRenewSession)
Perform the callback logic.
|
protected HttpAction |
redirectToOriginallyRequestedUrl(C context,
String defaultUrl) |
protected void |
renewSession(C context) |
protected void |
saveUserProfile(C context,
CommonProfile profile,
boolean multiProfile,
boolean renewSession) |
void |
setProfileManagerFactory(Function<C,ProfileManager> factory) |
public R perform(C context, Config config, HttpActionAdapter<R,C> httpActionAdapter, String inputDefaultUrl, Boolean inputMultiProfile, Boolean inputRenewSession)
CallbackLogic
perform
in interface CallbackLogic<R,C extends WebContext>
context
- the web contextconfig
- the security configurationhttpActionAdapter
- the HTTP action adapterinputDefaultUrl
- the default urlinputMultiProfile
- whether multi profiles are supportedinputRenewSession
- whether the session must be renewedprotected void saveUserProfile(C context, CommonProfile profile, boolean multiProfile, boolean renewSession)
protected void renewSession(C context)
protected HttpAction redirectToOriginallyRequestedUrl(C context, String defaultUrl)
protected ProfileManager getProfileManager(C context)
context
- the web contextpublic Function<C,ProfileManager> getProfileManagerFactory()
public void setProfileManagerFactory(Function<C,ProfileManager> factory)
Copyright © 2017. All rights reserved.