1pub mod config;
4pub mod error;
5pub mod extractors;
6pub mod handlers;
7pub mod identity;
8pub mod jwt;
9pub mod layer;
10pub mod oauth;
11pub mod registry;
12pub mod routes;
13pub mod session;
14pub mod state;
15pub mod strategy;
16pub mod user;
17
18pub mod testing;
19
20#[cfg(feature = "auth-2fa")]
21pub mod two_factor;
22
23pub use config::{load as load_config, AuthConfig, AuthRoutesConfig, JwtConfig, YamlConfig};
24pub use error::AuthError;
25pub use extractors::{AuthToken, CurrentUser, MaybeUser, RequireAuth};
26pub use handlers::{authenticate, register_user, sign_in, sign_in_with_session, sign_out};
27pub use identity::AuthIdentity;
28pub use jwt::{JwtClaims, JwtStrategy, TokenPair};
29pub use layer::{auth_layer, current_identity, current_user};
30pub use oauth::{OAuth2Provider, OAuthProvider, OAuthTokenResponse};
31pub use registry::{register_strategy, registered_strategies};
32pub use routes::mount;
33pub use session::{
34 SessionStrategy, SessionStrategy as CookieStrategy, SESSION_COOKIE, USER_ID_KEY,
35};
36pub use state::{global, init, set_state, try_global, AuthState};
37pub use strategy::AuthStrategy;
38pub use user::{authenticate_password, AuthUser};
39
40#[cfg(feature = "auth-2fa")]
41pub use two_factor::{
42 enroll as enroll_two_factor, verify_code as verify_two_factor_code, TwoFactorEnrollment,
43};
44
45#[cfg(feature = "generators")]
46pub mod generators;