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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! # AVL Auth - World-Class Identity and Access Management
//!
//! The most advanced authentication and authorization system, built for
//! AVL Cloud Platform with native AvilaDB integration.
//!
//! ## Features
//!
//! - **JWT Authentication**: Multi-algorithm support with automatic key rotation
//! - **OAuth2/OIDC**: Complete flows for Google, GitHub, Microsoft, Apple
//! - **MFA**: TOTP, WebAuthn/FIDO2, biometric authentication
//! - **RBAC + ABAC**: Dynamic role and attribute-based access control
//! - **API Keys**: Scoped keys with rate limiting and auto-rotation
//! - **Zero Trust**: Continuous authentication and risk-based access
//! - **Anomaly Detection**: ML-powered threat detection
//! - **Audit Trail**: Complete LGPD/GDPR compliant logging
//! - **Session Management**: Distributed sessions with AvilaDB
//! - **Password Security**: Argon2id with configurable cost parameters
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use avl_auth::{AuthClient, Credentials, Config};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let config = Config::default();
//! let auth = AuthClient::new(config).await?;
//!
//! // Register with strong password policy
//! let user_id = auth.register("user@example.com", "SecureP@ss123").await?;
//!
//! // Login with device fingerprinting
//! let session = auth.login(Credentials {
//! email: "user@example.com".to_string(),
//! password: "SecureP@ss123".to_string(),
//! device_id: Some("device_123".to_string()),
//! ip_address: Some("192.168.1.1".parse()?),
//! }).await?;
//!
//! // Verify token with automatic refresh
//! let claims = auth.verify_token(&session.access_token).await?;
//! println!("User: {}", claims.sub);
//!
//! Ok(())
//! }
//! ```
// Re-exports
pub use AuthClient;
pub use Config;
pub use ;
pub use *;
/// AVL Auth version
pub const VERSION: &str = env!;
/// Prelude with commonly used types