Skip to main content

confium_verify_server/
lib.rs

1//! Library surface for the HTTP verification service: exposes the
2//! handlers and the canonical router so integrators (and tests) can
3//! mount the same routes as the binary.
4
5pub mod handlers;
6
7pub use handlers::{AppState, VerifySignatifRequest};
8
9/// The canonical router, shared by the binary and tests.
10pub fn router() -> axum::Router {
11    axum::Router::new()
12        .route(
13            "/verify/composite",
14            axum::routing::post(handlers::verify_composite),
15        )
16        .route(
17            "/verify/signatif",
18            axum::routing::post(handlers::verify_signatif),
19        )
20        .route(
21            "/verify/inclusion",
22            axum::routing::post(handlers::verify_inclusion),
23        )
24        .route("/healthz", axum::routing::get(handlers::healthz))
25        .with_state(AppState)
26}