Package org.pac4j.core.logout.handler
Class DefaultLogoutHandler
- java.lang.Object
-
- org.pac4j.core.profile.factory.ProfileManagerFactoryAware
-
- org.pac4j.core.logout.handler.DefaultLogoutHandler
-
- All Implemented Interfaces:
LogoutHandler
public class DefaultLogoutHandler extends ProfileManagerFactoryAware implements LogoutHandler
Default logout handler.- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description DefaultLogoutHandler()
DefaultLogoutHandler(Store<java.lang.String,java.lang.Object> store)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
destroy(WebContext context, SessionStore sessionStore, java.lang.String channel)
void
destroySessionBack(WebContext context, SessionStore sessionStore, java.lang.String key)
Destroys the current web session for the given key for a back channel logout.void
destroySessionFront(WebContext context, SessionStore sessionStore, java.lang.String key)
Destroys the current web session for the given key for a front channel logout.Store<java.lang.String,java.lang.Object>
getStore()
boolean
isDestroySession()
void
recordSession(WebContext context, SessionStore sessionStore, java.lang.String key)
Associates a key with the current web session.void
renewSession(java.lang.String oldSessionId, WebContext context, SessionStore sessionStore)
Renew the web session.void
setDestroySession(boolean destroySession)
void
setStore(Store<java.lang.String,java.lang.Object> store)
java.lang.String
toString()
-
Methods inherited from class org.pac4j.core.profile.factory.ProfileManagerFactoryAware
getProfileManager, getProfileManagerFactory, setProfileManagerFactory
-
-
-
-
Constructor Detail
-
DefaultLogoutHandler
public DefaultLogoutHandler()
-
DefaultLogoutHandler
public DefaultLogoutHandler(Store<java.lang.String,java.lang.Object> store)
-
-
Method Detail
-
recordSession
public void recordSession(WebContext context, SessionStore sessionStore, java.lang.String key)
Description copied from interface:LogoutHandler
Associates a key with the current web session.- Specified by:
recordSession
in interfaceLogoutHandler
- Parameters:
context
- the web contextsessionStore
- the session storekey
- the key
-
destroySessionFront
public void destroySessionFront(WebContext context, SessionStore sessionStore, java.lang.String key)
Description copied from interface:LogoutHandler
Destroys the current web session for the given key for a front channel logout.- Specified by:
destroySessionFront
in interfaceLogoutHandler
- Parameters:
context
- the web contextsessionStore
- the session storekey
- the key
-
destroy
protected void destroy(WebContext context, SessionStore sessionStore, java.lang.String channel)
-
destroySessionBack
public void destroySessionBack(WebContext context, SessionStore sessionStore, java.lang.String key)
Description copied from interface:LogoutHandler
Destroys the current web session for the given key for a back channel logout.- Specified by:
destroySessionBack
in interfaceLogoutHandler
- Parameters:
context
- the web contextsessionStore
- the session storekey
- the key
-
renewSession
public void renewSession(java.lang.String oldSessionId, WebContext context, SessionStore sessionStore)
Description copied from interface:LogoutHandler
Renew the web session.- Specified by:
renewSession
in interfaceLogoutHandler
- Parameters:
oldSessionId
- the old session identifiercontext
- the web contextsessionStore
- the session store
-
getStore
public Store<java.lang.String,java.lang.Object> getStore()
-
setStore
public void setStore(Store<java.lang.String,java.lang.Object> store)
-
isDestroySession
public boolean isDestroySession()
-
setDestroySession
public void setDestroySession(boolean destroySession)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-