pub mod jwt;
pub mod middleware;
pub mod oauth;
pub mod password;
pub mod repository;

pub mod routes;
pub mod service;
pub mod two_factor;

// RBAC modules - only available when RBAC feature is enabled
#[cfg(feature = "rbac")]
pub mod rbac_config;
#[cfg(feature = "rbac")]
pub mod rbac_middleware;
#[cfg(feature = "rbac")]
pub mod rbac_repository;
#[cfg(feature = "rbac")]
pub mod rbac_service;

// Conditional RBAC service - always available but conditionally functional
pub mod conditional_rbac;

pub use jwt::JwtService;
pub use middleware::auth_middleware;
pub use oauth::OAuthService;
pub use password::PasswordService;

pub use routes::create_auth_routes;
pub use service::AuthService;
pub use two_factor::TwoFactorService;

// RBAC exports - only when feature is enabled
#[cfg(feature = "rbac")]
pub use rbac_config::RBACConfigLoader;
#[cfg(feature = "rbac")]
pub use rbac_middleware::{rbac_middleware, require_database_access, require_file_access};
#[cfg(feature = "rbac")]
pub use rbac_repository::RBACRepository;
#[cfg(feature = "rbac")]
pub use rbac_service::RBACService;
