Package org.pac4j.core.logout.handler
Class DefaultLogoutHandler<C extends WebContext>
- java.lang.Object
-
- org.pac4j.core.profile.factory.ProfileManagerFactory2Aware<C>
-
- org.pac4j.core.logout.handler.DefaultLogoutHandler<C>
-
- All Implemented Interfaces:
LogoutHandler<C>
public class DefaultLogoutHandler<C extends WebContext> extends ProfileManagerFactory2Aware<C> implements LogoutHandler<C>
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<String,Object> store)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
destroy(C context, SessionStore sessionStore, String channel)
void
destroySessionBack(C context, String key)
Destroys the current web session for the given key for a back channel logout.void
destroySessionFront(C context, String key)
Destroys the current web session for the given key for a front channel logout.Store<String,Object>
getStore()
boolean
isDestroySession()
void
recordSession(C context, String key)
Associates a key with the current web session.void
renewSession(String oldSessionId, C context)
Renew the web session.void
setDestroySession(boolean destroySession)
void
setStore(Store<String,Object> store)
String
toString()
-
Methods inherited from class org.pac4j.core.profile.factory.ProfileManagerFactory2Aware
getProfileManager, getProfileManagerFactory2, setProfileManagerFactory2
-
-
-
-
Method Detail
-
recordSession
public void recordSession(C context, String key)
Description copied from interface:LogoutHandler
Associates a key with the current web session.- Specified by:
recordSession
in interfaceLogoutHandler<C extends WebContext>
- Parameters:
context
- the web contextkey
- the key
-
destroySessionFront
public void destroySessionFront(C context, 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<C extends WebContext>
- Parameters:
context
- the web contextkey
- the key
-
destroy
protected void destroy(C context, SessionStore sessionStore, String channel)
-
destroySessionBack
public void destroySessionBack(C context, 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<C extends WebContext>
- Parameters:
context
- the web contextkey
- the key
-
renewSession
public void renewSession(String oldSessionId, C context)
Description copied from interface:LogoutHandler
Renew the web session.- Specified by:
renewSession
in interfaceLogoutHandler<C extends WebContext>
- Parameters:
oldSessionId
- the old session identifiercontext
- the web context
-
isDestroySession
public boolean isDestroySession()
-
setDestroySession
public void setDestroySession(boolean destroySession)
-
-