Interface JWTSession<A,B>

Type Parameters:
A - the session data type
B - the stateless session data type
All Superinterfaces:
Session<A>
All Known Implementing Classes:
AbstractJWTSession

public interface JWTSession<A,B> extends Session<A>

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

    • getStatelessData

      B getStatelessData()

      Returns the stateless session data.

      Returns:
      the stateless session data or null if exist in the session
    • getStatelessData

      default B getStatelessData(Supplier<B> supplier)

      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

      void setStatelessData(B statelessSessionData)

      Sets the stateless session data.

      Parameters:
      statelessSessionData - the stateless session data