Class QSessionStoreHelper
java.lang.Object
com.kingsrook.qqq.backend.core.modules.authentication.QSessionStoreHelper
Helper class for interacting with the session store.
Delegates to the provider registered with QSessionStoreRegistry. All methods
are designed to fail silently (returning empty/default values) when no
provider is registered, ensuring backwards compatibility.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DurationGet the configured default TTL from the session store provider.static booleanCheck if a session store provider is available.loadAndTouchSession(String sessionUuid) Load a session and touch it to reset its TTL in a single operation.loadSession(String sessionUuid) Load a session from the session store (if available).static voidstoreSession(String sessionUuid, QSession session, Duration ttl) Store a session in the session store (if available).static voidtouchSession(String sessionUuid) Touch a session to reset its TTL (if available).
-
Constructor Details
-
QSessionStoreHelper
public QSessionStoreHelper()
-
-
Method Details
-
isSessionStoreAvailable
public static boolean isSessionStoreAvailable()Check if a session store provider is available. -
storeSession
-
loadSession
-
loadAndTouchSession
Load a session and touch it to reset its TTL in a single operation. This is more efficient than calling loadSession + touchSession separately, as providers may implement optimized single-call versions (e.g., Redis GETEX, combined SQL query). -
touchSession
Touch a session to reset its TTL (if available). -
getDefaultTtl
Get the configured default TTL from the session store provider.
-