Skip to main content

rbp_auth/
lib.rs

1//! Authentication, sessions, and identity management.
2//!
3//! JWT-based authentication with Argon2 password hashing. Supports both
4//! registered members and anonymous lurkers for spectating games.
5//!
6//! ## Identity Types
7//!
8//! - [`Member`] — Registered user with credentials
9//! - [`Lurker`] — Anonymous session for spectators
10//! - [`User`] — Authenticated user (member or lurker)
11//! - [`Session`] — Active login session with expiry
12//!
13//! ## Security
14//!
15//! - [`Crypto`] — JWT signing and verification
16//! - [`Claims`] — JWT payload structure
17//! - [`password`] — Argon2 hashing and verification
18mod claims;
19mod crypto;
20mod identity;
21mod lurker;
22mod member;
23pub mod password;
24mod session;
25mod dto;
26
27pub use claims::*;
28pub use crypto::*;
29pub use dto::*;
30pub use identity::*;
31pub use lurker::*;
32pub use member::*;
33pub use session::*;
34
35#[cfg(feature = "database")]
36mod repository;
37#[cfg(feature = "database")]
38pub use repository::*;
39
40#[cfg(feature = "server")]
41mod handlers;
42#[cfg(feature = "server")]
43mod middleware;
44#[cfg(feature = "server")]
45pub use handlers::*;
46#[cfg(feature = "server")]
47pub use middleware::*;