rainier-auth 2.0.0

Authentication guards, user providers, password hashing and authorization gates for Rainier.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! The session, as authentication sees it.
//!
//! The bag itself lives in [`rainier_session`] — one session concept for the
//! whole framework rather than a second, narrower one here. This module is the
//! seam: the key the authenticated user is stored under, and the re-exports
//! that keep `rainier_auth::…` imports working.

pub use rainier_session::{
    generate_session_id, MemorySessionStore, Session, SessionData, SessionStore,
};

/// The session key holding the authenticated user's identifier.
///
/// Underscore-prefixed by convention, marking it as the framework's rather
/// than the application's — an application storing its own `user_id` for
/// unrelated reasons must not collide with the guard.
pub const AUTH_KEY: &str = "_auth_id";