Interface SessionStore

All Known Implementing Classes:
InMemorySessionStore, SignedCookieSessionStore

public interface SessionStore
SPI for persisting OidcSession instances and resolving them back from a session-cookie value.

Two implementations are bundled:

  • SignedCookieSessionStore — the documented default. Stateless: the session is HMAC-signed and stored entirely in the cookie value. Scales horizontally and survives restarts with no shared store, but cannot be server-revoked (so it does not support back-channel logout — see supportsServerSideRevocation()).
  • InMemorySessionStore — the simpler single-instance / dev option. Server-side indexed by sub and sid, so it does support back-channel logout. Lost on restart; breaks under horizontal scaling without sticky sessions.

Distributed stores (Redis / JDBC) are caller-supplied via this SPI. A distributed store that wants to participate in back-channel logout must implement invalidateBySubject(String) / invalidateBySessionId(String) and report supportsServerSideRevocation() as true.

Implementations must be thread-safe.

See Also:
Since:
10.0.0