public class DefaultLogoutLogic<R,C extends WebContext> extends ProfileManagerFactoryAware<C> implements LogoutLogic<R,C>
Default logout logic:
If the localLogout
property is true
, the pac4j profiles are removed from the web session
(and the web session is destroyed if the destroySession
property is true
).
A post logout action is computed as the redirection to the url
request parameter if it matches the
logoutUrlPattern
or to the defaultUrl
if it is defined or as a blank page otherwise.
If the centralLogout
property is true
, the user is redirected to the identity provider
for a central logout and then optionally to the post logout redirection URL (if it's supported by the identity provider and if it's an
absolute URL). If no central logout is defined, the post logout action is performed directly.
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
DefaultLogoutLogic() |
Modifier and Type | Method and Description |
---|---|
R |
perform(C context,
Config config,
HttpActionAdapter<R,C> httpActionAdapter,
String defaultUrl,
String inputLogoutUrlPattern,
Boolean inputLocalLogout,
Boolean inputDestroySession,
Boolean inputCentralLogout)
Perform the application logout logic.
|
getProfileManager, getProfileManagerFactory, setProfileManagerFactory
public R perform(C context, Config config, HttpActionAdapter<R,C> httpActionAdapter, String defaultUrl, String inputLogoutUrlPattern, Boolean inputLocalLogout, Boolean inputDestroySession, Boolean inputCentralLogout)
LogoutLogic
perform
in interface LogoutLogic<R,C extends WebContext>
context
- the web contextconfig
- the security configurationhttpActionAdapter
- the HTTP action adapterdefaultUrl
- the default urlinputLogoutUrlPattern
- the logout url patterninputLocalLogout
- whether a local logout is requiredinputDestroySession
- whether the web session must be destroyedinputCentralLogout
- whether a central logout is requiredCopyright © 2018. All rights reserved.