hyperlane-plugin-session 23.1.0

A high-concurrency sharded session management plugin for the Hyperlane framework with pluggable async SessionStore traits, optional HMAC-SHA256 signed cookies, dirty-tracked zero-write reads, and session-fixation ID regeneration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::*;

/// Global process-wide [`SessionPlugin`] singleton initialized via [`SessionPlugin::init`].
pub(crate) static SESSION_PLUGIN: OnceLock<SessionPlugin> = OnceLock::new();

/// Lock-free monotonic counter feeding high-entropy session ID generation.
pub(crate) static SESSION_SEQ: AtomicU64 = AtomicU64::new(1);

/// Process-unique seed initialized once on first session ID generation.
pub(crate) static SESSION_SEED: OnceLock<u64> = OnceLock::new();

/// Shared immutable empty session attribute map reused across anonymous and destroyed sessions.
pub(crate) static EMPTY_SESSION_VALUES: OnceLock<Arc<HashMap<String, String>>> = OnceLock::new();