1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! # modo::auth
//!
//! Authentication utilities for the modo framework: Argon2id password hashing,
//! numeric OTP, RFC 6238 TOTP, backup recovery codes, JWT middleware, and OAuth 2.0.
//!
//! Requires feature `"auth"`.
//!
//! ## Submodules
//!
//! | Module | Purpose |
//! |--------------|---------|
//! | [`password`] | Argon2id password hashing and verification |
//! | [`otp`] | Numeric one-time password generation and verification |
//! | [`totp`] | RFC 6238 TOTP authenticator (Google Authenticator compatible) |
//! | [`backup`] | One-time backup recovery code generation and verification |
//! | [`jwt`] | JWT encoding, decoding, signing, and axum Tower middleware |
//! | [`oauth`] | OAuth 2.0 provider integrations (GitHub, Google) |
//!
//! ## Convenience re-exports
//!
//! The following types are re-exported at the `modo::auth` level for convenience:
//!
//! - [`PasswordConfig`] — Argon2id hashing parameters
//! - [`Totp`] — TOTP authenticator instance
//! - [`TotpConfig`] — TOTP algorithm parameters
//! - [`Claims`], [`JwtConfig`], [`JwtEncoder`], [`JwtDecoder`], [`JwtLayer`] — core JWT types
//! - [`Bearer`] — axum extractor for raw Bearer token strings
//! - [`JwtError`] — typed JWT error enum
//! - [`HmacSigner`], [`TokenSigner`], [`TokenVerifier`] — JWT signing traits and HMAC implementation
//! - [`TokenSource`] — pluggable token extraction trait
//! - [`Revocation`] — async token revocation trait
//! - [`ValidationConfig`] — JWT validation policy
//!
//! JWT and OAuth types are also re-exported at the crate root (`modo::Claims`,
//! `modo::Google`, etc.) when the `auth` feature is enabled.
// Convenience re-exports
pub use PasswordConfig;
pub use ;
pub use ;