1#![allow(clippy::missing_errors_doc)] #![allow(clippy::missing_panics_doc)] #![allow(clippy::unused_async)] #![allow(clippy::cast_possible_truncation)] #![allow(clippy::cast_precision_loss)] #![allow(clippy::cast_sign_loss)] #![allow(clippy::cast_possible_wrap)] #![allow(clippy::struct_excessive_bools)] #![allow(clippy::too_many_lines)] pub mod types;
61
62#[cfg(feature = "jwt")]
63pub mod jwt;
64
65#[cfg(feature = "password")]
66pub mod password;
67
68#[cfg(feature = "oauth")]
69pub mod oauth;
70
71#[cfg(feature = "mfa")]
72pub mod mfa;
73
74#[cfg(feature = "session")]
75pub mod session;
76
77#[cfg(feature = "revocation")]
78pub mod revocation;
79
80#[cfg(feature = "ratelimit")]
81pub mod ratelimit;
82
83#[cfg(feature = "saml")]
84pub mod saml;
85
86#[cfg(feature = "ldap")]
87pub mod ldap;
88
89#[cfg(feature = "webauthn")]
90pub mod webauthn;
91
92#[cfg(feature = "risk")]
93pub mod risk;
94
95#[cfg(feature = "rotation")]
96pub mod rotation;
97
98#[cfg(feature = "apikey")]
99pub mod apikey;
100
101#[cfg(feature = "metrics")]
102pub mod metrics;
103
104#[cfg(feature = "cert")]
105pub mod cert;
106
107#[cfg(feature = "idp")]
108pub mod idp;
109
110#[cfg(feature = "ai")]
111pub mod ai;
112
113pub use types::*;
115
116#[cfg(feature = "jwt")]
117pub use jwt::{ClaimsBuilder, JwtManager};
118
119#[cfg(feature = "password")]
120pub use password::{
121 PasswordManager, PasswordPolicy, PasswordStrength, PolicyValidationResult, PolicyViolation,
122};
123
124#[cfg(feature = "oauth")]
125pub use oauth::{OAuth2Service, OAuth2State, OAuth2Token, OIDCUserInfo};
126
127#[cfg(feature = "mfa")]
128pub use mfa::{TotpConfig, TotpEnrollment, TotpManager};
129
130#[cfg(feature = "session")]
131pub use session::{
132 InMemorySessionStore, Session, SessionConfig, SessionConfigBuilder, SessionInfo,
133 SessionManager, SessionStore,
134};
135
136#[cfg(feature = "revocation")]
137pub use revocation::{
138 InMemoryRevocationStore, RevocationConfig, RevocationConfigBuilder, RevocationEntry,
139 RevocationManager, RevocationReason, RevocationStats, RevocationStore,
140};
141
142#[cfg(feature = "ratelimit")]
143pub use ratelimit::{
144 RateLimitConfig, RateLimitConfigBuilder, RateLimitResult, RateLimitStatus, RateLimiter,
145 UserRateLimitStatus,
146};
147
148#[cfg(feature = "saml")]
149pub use saml::{Assertion, AuthnRequest, SamlError, ServiceProvider, SpConfig, SpConfigBuilder};
150
151#[cfg(feature = "ldap")]
152pub use ldap::{LdapAuthenticator, LdapConfig, LdapError, LdapUser};
153
154#[cfg(feature = "webauthn")]
155pub use webauthn::{
156 CredentialStore, InMemoryCredentialStore, StoredCredential, WebAuthnAuthenticator,
157 WebAuthnConfig, WebAuthnConfigBuilder, WebAuthnError,
158};
159
160#[cfg(feature = "risk")]
161pub use risk::{
162 DeviceFingerprint, GeoLocation, LoginContext, LoginContextBuilder, RiskAnalyzer,
163 RiskAssessment, RiskConfig, RiskLevel, RiskReason,
164};
165
166#[cfg(feature = "rotation")]
167pub use rotation::{
168 RefreshTokenMetadata, RotationConfig, RotationConfigBuilder, RotationManager, RotationStats,
169};
170
171#[cfg(feature = "apikey")]
172pub use apikey::{
173 ApiKeyConfig, ApiKeyManager, ApiKeyMetadata, ApiKeyScope, ApiKeyStats, ApiKeyValidation,
174 GeneratedApiKey,
175};
176
177#[cfg(feature = "metrics")]
178pub use metrics::{
179 AuthEvent, AuthEventRecord, AuthMetrics, GeoDistribution, MetricsCollector, TimeSeriesPoint,
180};
181
182#[cfg(feature = "cert")]
183pub use cert::{
184 CertAuthenticator, CertConfig, CertConfigBuilder, CertError, CertValidation, RevocationStatus,
185};
186
187#[cfg(feature = "idp")]
188pub use idp::{
189 discover_oidc, IdpClient, IdpConfig, IdpConfigBuilder, IdpError, IdpProvider, IdpUserInfo,
190 OidcDiscovery,
191};
192
193#[cfg(feature = "ai")]
194pub use ai::{
195 AiSecurityConfig, AiSecurityEngine, AiSecurityError, AiSecurityStats, AnomalyDetection,
196 BehaviorProfile, LoginEvent, TrustLevel,
197};
198
199#[cfg(test)]
200mod tests {
201 use super::*;
202
203 #[test]
204 fn test_basic_types() {
205 let user = User {
206 username: "test".to_string(),
207 roles: vec!["user".to_string()],
208 email: None,
209 full_name: None,
210 last_login: None,
211 permissions: vec![],
212 };
213
214 assert_eq!(user.username, "test");
215 }
216}