- Type Parameters:
A
- the session data typeB
- the stateless session data type
- All Superinterfaces:
Session<A>
- All Known Implementing Classes:
AbstractJWTSession
A JWT session allows to store stateless data in a JWT session identifier stored on the frontend in addition to the stateful session data stored on the backend.
- Since:
- 1.13
- Author:
- Jeremy Kuhn
-
Field Summary
Fields inherited from interface io.inverno.mod.session.Session
DEFAULT_MAX_INACTIVE_INTERVAL
-
Method Summary
Modifier and TypeMethodDescriptionReturns the stateless session data.default B
getStatelessData
(Supplier<B> supplier) Returns the stateless session data or creates them using the specified supplier if none exist in the session.void
setStatelessData
(B statelessSessionData) Sets the stateless session data.Methods inherited from interface io.inverno.mod.session.Session
getCreationTime, getData, getData, getExpirationTime, getId, getLastAccessedTime, getMaxInactiveInterval, getOriginalId, invalidate, isExpired, isInvalidated, isNew, refreshId, refreshId, save, setData, setExpirationTime, setMaxInactiveInterval
-
Method Details
-
getStatelessData
B getStatelessData()Returns the stateless session data.
- Returns:
- the stateless session data or null if exist in the session
-
getStatelessData
Returns the stateless session data or creates them using the specified supplier if none exist in the session.
- Parameters:
supplier
- a stateless session data supplier- Returns:
- the stateless session data
-
setStatelessData
Sets the stateless session data.
- Parameters:
statelessSessionData
- the stateless session data
-