powdb_auth/lib.rs
1//! `powdb-auth` — argon2id password hashing and a persisted user/role store.
2//!
3//! Provides PowDB's RBAC primitives: the [`role`] permission lattice, the
4//! [`hash`] argon2id password hashing, and the persisted [`store::UserStore`].
5//! These are live in production: `powdb-server` loads the [`store::UserStore`]
6//! at startup and enforces the [`role`] lattice on every query
7//! (`crates/server/src/handler/`), and `powdb-cli` manages users via the
8//! `useradd`/`passwd`/`userdel` subcommands.
9
10#![warn(missing_docs)]
11
12/// The crate's typed error, [`error::AuthError`].
13pub mod error;
14pub mod hash;
15pub mod role;
16pub mod store;
17
18pub use error::AuthError;
19pub use hash::{hash_password, verify_password};
20pub use role::{Permission, Role};
21pub use store::{User, UserStore};