modo/cookie/mod.rs
1//! # modo::cookie
2//!
3//! Cookie utilities: configuration, key derivation, and re-exports of
4//! `axum_extra` cookie jar types.
5//!
6//! Provides:
7//!
8//! - [`CookieConfig`] — cookie security attributes loaded from YAML config.
9//! - [`key_from_config`] — derives an HMAC signing [`Key`] from a [`CookieConfig`].
10//! - [`Key`] — re-export of `axum_extra::extract::cookie::Key`.
11//! - [`CookieJar`] — re-export of the plain (unsigned) cookie jar.
12//! - [`SignedCookieJar`] — re-export of the HMAC-signed cookie jar.
13//! - [`PrivateCookieJar`] — re-export of the encrypted (private) cookie jar.
14//!
15//! The primary entry points are [`CookieConfig`] (loaded from YAML) and
16//! [`key_from_config`] (derives an HMAC [`Key`] at startup). The re-exported
17//! jar types are used by the session and flash middleware and can be used
18//! directly in handlers.
19//!
20//! This module is always available; no feature flag is required.
21
22mod config;
23mod key;
24
25pub use config::CookieConfig;
26pub use key::key_from_config;
27
28pub use axum_extra::extract::cookie::{CookieJar, Key, PrivateCookieJar, SignedCookieJar};