pub mod captcha; pub mod disable_2fa; pub mod enable_2fa; pub mod get_2fa_status; pub mod get_email; pub mod login; pub mod logout; pub mod me; pub mod regenerate_2fa_backup_codes; pub mod register; pub mod register_email_code; pub mod request_email_change; pub mod request_reset_password; pub mod rsa; pub mod verify_2fa; pub mod verify_email; pub mod verify_reset_password; use actix_web::web; pub fn configure(cfg: &mut web::ServiceConfig) { cfg.service( web::scope("/auth") .route("/rsa", web::get().to(rsa::handle)) .route("/captcha", web::get().to(captcha::handle)) .route("/login", web::post().to(login::handle)) .route("/logout", web::post().to(logout::handle)) .route("/me", web::get().to(me::handle)) .route( "/register/email-code", web::post().to(register_email_code::handle), ) .route("/register", web::post().to(register::handle)) .route("/email", web::get().to(get_email::handle)) .route( "/email/change", web::post().to(request_email_change::handle), ) .route("/email/verify", web::post().to(verify_email::handle)) .route( "/reset-password", web::post().to(request_reset_password::handle), ) .route( "/reset-password/verify", web::post().to(verify_reset_password::handle), ) .route("/2fa/status", web::get().to(get_2fa_status::handle)) .route("/2fa/enable", web::post().to(enable_2fa::handle)) .route("/2fa/verify", web::post().to(verify_2fa::handle)) .route("/2fa/disable", web::post().to(disable_2fa::handle)) .route( "/2fa/backup-codes/regenerate", web::post().to(regenerate_2fa_backup_codes::handle), ), ); }