Package org.pac4j.play.store
Class PlayCookieSessionStore
- java.lang.Object
-
- org.pac4j.play.store.PlayCookieSessionStore
-
- All Implemented Interfaces:
org.pac4j.core.context.session.SessionStore<PlayWebContext>
,PlaySessionStore
@Singleton public class PlayCookieSessionStore extends Object implements PlaySessionStore
A PlaySesssionStore which only uses the Play Session cookie for storage, allowing for a stateless backend.- Since:
- 6.1.0
- Author:
- Vidmantas Zemleris
-
-
Field Summary
Fields Modifier and Type Field Description static org.pac4j.core.util.JavaSerializationHelper
JAVA_SER_HELPER
-
Constructor Summary
Constructors Constructor Description PlayCookieSessionStore()
PlayCookieSessionStore(DataEncrypter dataEncrypter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<org.pac4j.core.context.session.SessionStore<PlayWebContext>>
buildFromTrackableSession(PlayWebContext playWebContext, Object o)
protected Object
clearUserProfiles(Object value)
static byte[]
compressBytes(byte[] srcBytes)
boolean
destroySession(PlayWebContext playWebContext)
Optional<Object>
get(PlayWebContext context, String key)
String
getOrCreateSessionId(PlayWebContext context)
Optional<Object>
getTrackableSession(PlayWebContext playWebContext)
boolean
renewSession(PlayWebContext playWebContext)
void
set(PlayWebContext context, String key, Object value)
static byte[]
uncompressBytes(byte[] zippedBytes)
-
-
-
Constructor Detail
-
PlayCookieSessionStore
public PlayCookieSessionStore()
-
PlayCookieSessionStore
public PlayCookieSessionStore(DataEncrypter dataEncrypter)
-
-
Method Detail
-
getOrCreateSessionId
public String getOrCreateSessionId(PlayWebContext context)
- Specified by:
getOrCreateSessionId
in interfaceorg.pac4j.core.context.session.SessionStore<PlayWebContext>
-
get
public Optional<Object> get(PlayWebContext context, String key)
- Specified by:
get
in interfaceorg.pac4j.core.context.session.SessionStore<PlayWebContext>
-
set
public void set(PlayWebContext context, String key, Object value)
- Specified by:
set
in interfaceorg.pac4j.core.context.session.SessionStore<PlayWebContext>
-
destroySession
public boolean destroySession(PlayWebContext playWebContext)
- Specified by:
destroySession
in interfaceorg.pac4j.core.context.session.SessionStore<PlayWebContext>
-
getTrackableSession
public Optional<Object> getTrackableSession(PlayWebContext playWebContext)
- Specified by:
getTrackableSession
in interfaceorg.pac4j.core.context.session.SessionStore<PlayWebContext>
-
buildFromTrackableSession
public Optional<org.pac4j.core.context.session.SessionStore<PlayWebContext>> buildFromTrackableSession(PlayWebContext playWebContext, Object o)
- Specified by:
buildFromTrackableSession
in interfaceorg.pac4j.core.context.session.SessionStore<PlayWebContext>
-
renewSession
public boolean renewSession(PlayWebContext playWebContext)
- Specified by:
renewSession
in interfaceorg.pac4j.core.context.session.SessionStore<PlayWebContext>
-
uncompressBytes
public static byte[] uncompressBytes(byte[] zippedBytes)
-
compressBytes
public static byte[] compressBytes(byte[] srcBytes)
-
-