Package org.pac4j.play.store
Class PlayCacheSessionStore
java.lang.Object
org.pac4j.play.store.PlayCacheSessionStore
- All Implemented Interfaces:
org.pac4j.core.context.session.SessionStore
- Direct Known Subclasses:
PlayEhCacheSessionStore
@Singleton
public class PlayCacheSessionStore
extends Object
implements org.pac4j.core.context.session.SessionStore
This session store internally uses the
PlayCacheStore which uses the Play Cache, only an identifier is saved into the Play session.- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPlayCacheSessionStore(com.google.inject.Provider<play.cache.SyncCacheApi> cacheProvider) PlayCacheSessionStore(play.cache.SyncCacheApi cache) -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.pac4j.core.context.session.SessionStore>buildFromTrackableSession(org.pac4j.core.context.WebContext context, Object trackableSession) booleandestroySession(org.pac4j.core.context.WebContext context) getSessionId(org.pac4j.core.context.WebContext context, boolean createSession) protected StringgetSessionIdFromSessionOrRequest(org.pac4j.core.context.WebContext context) intgetTrackableSession(org.pac4j.core.context.WebContext context) booleanrenewSession(org.pac4j.core.context.WebContext context) voidprotected voidprotected voidsetSessionIdInSession(org.pac4j.core.context.WebContext context, String sessionId) voidsetTimeout(int timeout)
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
store
-
-
Constructor Details
-
PlayCacheSessionStore
protected PlayCacheSessionStore() -
PlayCacheSessionStore
@Inject public PlayCacheSessionStore(play.cache.SyncCacheApi cache) -
PlayCacheSessionStore
public PlayCacheSessionStore(com.google.inject.Provider<play.cache.SyncCacheApi> cacheProvider)
-
-
Method Details
-
getSessionId
public Optional<String> getSessionId(org.pac4j.core.context.WebContext context, boolean createSession) - Specified by:
getSessionIdin interfaceorg.pac4j.core.context.session.SessionStore
-
getSessionIdFromSessionOrRequest
-
setSessionIdInSession
-
get
- Specified by:
getin interfaceorg.pac4j.core.context.session.SessionStore
-
set
- Specified by:
setin interfaceorg.pac4j.core.context.session.SessionStore
-
destroySession
public boolean destroySession(org.pac4j.core.context.WebContext context) - Specified by:
destroySessionin interfaceorg.pac4j.core.context.session.SessionStore
-
getTrackableSession
- Specified by:
getTrackableSessionin interfaceorg.pac4j.core.context.session.SessionStore
-
buildFromTrackableSession
public Optional<org.pac4j.core.context.session.SessionStore> buildFromTrackableSession(org.pac4j.core.context.WebContext context, Object trackableSession) - Specified by:
buildFromTrackableSessionin interfaceorg.pac4j.core.context.session.SessionStore
-
renewSession
public boolean renewSession(org.pac4j.core.context.WebContext context) - Specified by:
renewSessionin interfaceorg.pac4j.core.context.session.SessionStore
-
getTimeout
public int getTimeout() -
setTimeout
public void setTimeout(int timeout) -
setDefaultTimeout
protected void setDefaultTimeout()
-