Package org.cyclos.impl.utils
Class MapSessionStore
- java.lang.Object
-
- org.cyclos.impl.utils.MapSessionStore
-
- All Implemented Interfaces:
org.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
public class MapSessionStore extends Object implements org.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
A Pac4jSessionStoreimplementation that stores attributes in aMap
-
-
Constructor Summary
Constructors Constructor Description MapSessionStore(String id, Function<String,Object> getter, BiConsumer<String,Object> setter, Runnable destroy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<org.pac4j.core.context.session.SessionStore<RequestInfoWebContext>>buildFromTrackableSession(RequestInfoWebContext context, Object trackableSession)booleandestroySession(RequestInfoWebContext context)Optional<Object>get(RequestInfoWebContext context, String key)StringgetOrCreateSessionId(RequestInfoWebContext context)Optional<?>getTrackableSession(RequestInfoWebContext context)booleanrenewSession(RequestInfoWebContext context)voidset(RequestInfoWebContext context, String key, Object value)
-
-
-
Method Detail
-
buildFromTrackableSession
public Optional<org.pac4j.core.context.session.SessionStore<RequestInfoWebContext>> buildFromTrackableSession(RequestInfoWebContext context, Object trackableSession)
- Specified by:
buildFromTrackableSessionin interfaceorg.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
-
destroySession
public boolean destroySession(RequestInfoWebContext context)
- Specified by:
destroySessionin interfaceorg.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
-
get
public Optional<Object> get(RequestInfoWebContext context, String key)
- Specified by:
getin interfaceorg.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
-
getOrCreateSessionId
public String getOrCreateSessionId(RequestInfoWebContext context)
- Specified by:
getOrCreateSessionIdin interfaceorg.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
-
getTrackableSession
public Optional<?> getTrackableSession(RequestInfoWebContext context)
- Specified by:
getTrackableSessionin interfaceorg.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
-
renewSession
public boolean renewSession(RequestInfoWebContext context)
- Specified by:
renewSessionin interfaceorg.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
-
set
public void set(RequestInfoWebContext context, String key, Object value)
- Specified by:
setin interfaceorg.pac4j.core.context.session.SessionStore<RequestInfoWebContext>
-
-