Package io.buji.pac4j.context
Class ShiroSessionStore
- java.lang.Object
-
- io.buji.pac4j.context.ShiroSessionStore
-
- All Implemented Interfaces:
org.pac4j.core.context.session.SessionStore
public class ShiroSessionStore extends Object implements org.pac4j.core.context.session.SessionStore
Specific session store for Shiro.- Since:
- 1.4.0
- Author:
- Jerome Leleu
-
-
Field Summary
Fields Modifier and Type Field Description static ShiroSessionStoreINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description protectedShiroSessionStore()
-
Method Summary
All 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)booleandestroySession(org.pac4j.core.context.WebContext context)Optional<Object>get(org.pac4j.core.context.WebContext context, String key)protected org.apache.shiro.session.SessiongetSession(boolean createSession)Get the Shiro session (do not create it if it does not exist).Optional<String>getSessionId(org.pac4j.core.context.WebContext context, boolean createSession)OptionalgetTrackableSession(org.pac4j.core.context.WebContext context)booleanrenewSession(org.pac4j.core.context.WebContext context)voidset(org.pac4j.core.context.WebContext context, String key, Object value)
-
-
-
Field Detail
-
INSTANCE
public static final ShiroSessionStore INSTANCE
-
-
Method Detail
-
getSession
protected org.apache.shiro.session.Session getSession(boolean createSession)
Get the Shiro session (do not create it if it does not exist).- Parameters:
createSession- create a session if requested- Returns:
- the Shiro session
-
getSessionId
public Optional<String> getSessionId(org.pac4j.core.context.WebContext context, boolean createSession)
- Specified by:
getSessionIdin interfaceorg.pac4j.core.context.session.SessionStore
-
get
public Optional<Object> get(org.pac4j.core.context.WebContext context, String key)
- Specified by:
getin interfaceorg.pac4j.core.context.session.SessionStore
-
set
public void set(org.pac4j.core.context.WebContext context, String key, Object value)- 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
public Optional getTrackableSession(org.pac4j.core.context.WebContext context)
- 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
-
-