Skip to main content

haste_server/auth_n/mfa/routes/
mod.rs

1use crate::services::ServerState;
2use axum::Router;
3use axum_extra::routing::RouterExt;
4use haste_fhir_search::SearchEngine;
5use haste_fhir_terminology::FHIRTerminology;
6use haste_repository::Repository;
7use std::sync::Arc;
8
9mod activate;
10mod admin;
11mod create;
12mod delete;
13pub mod totp_verification;
14
15pub fn create_router<
16    Repo: Repository + Send + Sync,
17    Search: SearchEngine + Send + Sync,
18    Terminology: FHIRTerminology + Send + Sync,
19>(
20    _state: Arc<ServerState<Repo, Search, Terminology>>,
21) -> Router<Arc<ServerState<Repo, Search, Terminology>>> {
22    Router::new()
23        .typed_get(admin::admin_get)
24        .typed_post(create::create_post)
25        .typed_post(delete::mfa_delete_post)
26        .typed_get(activate::activate_get)
27        .typed_post(activate::activate_post)
28        .typed_get(totp_verification::totp_verification_get)
29        .typed_post(totp_verification::totp_verification_post)
30}