Expand description
Where a Session lives. The library never picks a path: the embedder
passes an Arc<dyn SessionStore> to Context::new
and the context loads the session once, then saves every change it makes
(silent SSO refresh, hydra mint, GrabMart login, address changes) through
it.
The trait is async (via async_trait) because Context
is async and embedders may back it with an async database client; calling
a blocking store from inside the context would need a nested runtime. A
file-backed store simply does its (small) blocking IO inside the future.
The CLI’s FileSessionStore (session.json, mode 0600) lives in the
grabcli binary crate; MemorySessionStore is for tests and embedders
that persist elsewhere.
Structs§
- Memory
Session Store - A session held in memory. Counts saves (handy in tests).
Traits§
- Session
Store - Loads and saves the one Grab session a
Contextuses. Implementations must never log cookie or token values.