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
  • Constructor Details

    • PlayCookieSessionStore

      public PlayCookieSessionStore()
    • PlayCookieSessionStore

      public PlayCookieSessionStore(DataEncrypter dataEncrypter)
  • Method Details

    • getSessionId

      public Optional<String> getSessionId(org.pac4j.core.context.WebContext context, boolean createSession)
      Specified by:
      getSessionId in interface org.pac4j.core.context.session.SessionStore
    • get

      public Optional<Object> get(org.pac4j.core.context.WebContext context, String key)
      Specified by:
      get in interface org.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 interface org.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 interface org.pac4j.core.context.session.SessionStore
    • getTrackableSession

      public Optional<Object> getTrackableSession(org.pac4j.core.context.WebContext context)
      Specified by:
      getTrackableSession in interface org.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 interface org.pac4j.core.context.session.SessionStore
    • renewSession

      public boolean renewSession(org.pac4j.core.context.WebContext context)
      Specified by:
      renewSession in interface org.pac4j.core.context.session.SessionStore
    • clearUserProfiles

      protected Object clearUserProfiles(Object value)
    • uncompressBytes

      public static byte[] uncompressBytes(byte[] zippedBytes)
    • compressBytes

      public static byte[] compressBytes(byte[] srcBytes)