Package org.pac4j.play.store
Class PlayCookieSessionStore
- java.lang.Object
-
- org.pac4j.play.store.PlayCookieSessionStore
-
- All Implemented Interfaces:
org.pac4j.core.context.session.SessionStore
@Singleton public class PlayCookieSessionStore extends Object implements org.pac4j.core.context.session.SessionStore
A session store 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.serializer.JavaSerializer
JAVA_SERIALIZER
-
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>
buildFromTrackableSession(org.pac4j.core.context.WebContext context, Object trackableSession)
protected Object
clearUserProfiles(Object value)
static byte[]
compressBytes(byte[] srcBytes)
boolean
destroySession(org.pac4j.core.context.WebContext context)
Optional<Object>
get(org.pac4j.core.context.WebContext context, String key)
Optional<String>
getSessionId(org.pac4j.core.context.WebContext context, boolean createSession)
String
getSessionName()
protected Map<String,Object>
getSessionValues(org.pac4j.core.context.WebContext context)
Optional<Object>
getTrackableSession(org.pac4j.core.context.WebContext context)
protected void
putSessionValues(org.pac4j.core.context.WebContext context, Map<String,Object> values)
boolean
renewSession(org.pac4j.core.context.WebContext context)
void
set(org.pac4j.core.context.WebContext context, String key, Object value)
void
setSessionName(String sessionName)
static byte[]
uncompressBytes(byte[] zippedBytes)
-
-
-
Constructor Detail
-
PlayCookieSessionStore
public PlayCookieSessionStore()
-
PlayCookieSessionStore
public PlayCookieSessionStore(DataEncrypter dataEncrypter)
-
-
Method Detail
-
getSessionId
public Optional<String> getSessionId(org.pac4j.core.context.WebContext context, boolean createSession)
- Specified by:
getSessionId
in interfaceorg.pac4j.core.context.session.SessionStore
-
get
public Optional<Object> get(org.pac4j.core.context.WebContext context, String key)
- Specified by:
get
in interfaceorg.pac4j.core.context.session.SessionStore
-
getSessionValues
protected Map<String,Object> getSessionValues(org.pac4j.core.context.WebContext context)
-
set
public void set(org.pac4j.core.context.WebContext context, String key, Object value)
- Specified by:
set
in interfaceorg.pac4j.core.context.session.SessionStore
-
putSessionValues
protected void putSessionValues(org.pac4j.core.context.WebContext context, Map<String,Object> values)
-
destroySession
public boolean destroySession(org.pac4j.core.context.WebContext context)
- Specified by:
destroySession
in interfaceorg.pac4j.core.context.session.SessionStore
-
getTrackableSession
public Optional<Object> getTrackableSession(org.pac4j.core.context.WebContext context)
- Specified by:
getTrackableSession
in 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:
buildFromTrackableSession
in interfaceorg.pac4j.core.context.session.SessionStore
-
renewSession
public boolean renewSession(org.pac4j.core.context.WebContext context)
- Specified by:
renewSession
in interfaceorg.pac4j.core.context.session.SessionStore
-
uncompressBytes
public static byte[] uncompressBytes(byte[] zippedBytes)
-
compressBytes
public static byte[] compressBytes(byte[] srcBytes)
-
getSessionName
public String getSessionName()
-
setSessionName
public void setSessionName(String sessionName)
-
-