Skip to main content

Module session_version

Module session_version 

Source
Expand description

Building blocks for sv claim validation (STANDARDS_AUTH_INVALIDATION §5).

In 4.0.0 the validator itself moved into the middleware layer (see SvAwareSessionResolver) so consumers get sv enforcement by default. This module hosts the reusable primitives:

  • SessionVersionCache — pluggable cache trait (default impl: in-memory MemorySessionVersionCache, 60 s TTL). Consumers with shared substrates (KVRocks, Redis) can implement this trait to converge break-glass across pods within network RTT instead of waiting for the per-pod TTL.
  • SV_CACHE_KEY_PREFIX / SV_CACHE_TTL — the cache contract constants. Match PAS’s crates/ppoppo-token::sv_cache_key so a custom KVRocks cache adapter can read the same key namespace as PCS chat-auth.

See SvAwareSessionResolver for the resolver entry point.

Structs§

MemorySessionVersionCache
In-memory SessionVersionCache. Default choice for SDK consumers.

Constants§

SV_CACHE_KEY_PREFIX
Namespace prefix for cache keys. Matches chat-auth and is_admin caches.
SV_CACHE_TTL
TTL per paseto-sv-claim.md §R5. 60 s, non-configurable by design.

Traits§

SessionVersionCache
Cache abstraction for sv:{ppnum_id} lookups.