Class SignedCookieSessionStore

java.lang.Object
org.apache.juneau.rest.server.auth.oidc.rp.SignedCookieSessionStore
All Implemented Interfaces:
SessionStore

public class SignedCookieSessionStore extends Object implements SessionStore
Stateless SessionStore that serializes the session into an HMAC-signed compact JWT carried entirely in the session cookie. This is the documented default.

Because the session lives client-side, this store scales horizontally and survives server restarts with no shared store. The trade-offs:

  • No server-side revocation — supportsServerSideRevocation() is false; a stateless cookie cannot be force-revoked, so this store does NOT support back-channel logout. Use InMemorySessionStore or a caller-supplied distributed store if back-channel logout is required.
  • Size cap — cookies are capped (~4 KB); only minimal claims are stored, never the raw access / refresh / ID tokens. An over-cap payload throws rather than silently truncating.
  • Key rotation — rotating the signing key invalidates all live sessions (users are bounced to re-login).

The payload is signed with HS256 using the configured signing key (which must be at least 256 bits / 32 bytes). Signature failures, expiry, and parse errors all resolve to Optional.empty() on lookup(String) (fail-closed).

Since:
10.0.0