#![forbid(unsafe_code)]
#![doc = include_str!("../README.md")]
use ::reqwest_middleware::ClientWithMiddleware;
use mauth_core::signer::Signer;
use mauth_core::verifier::Verifier;
use reqwest::Url;
use std::collections::HashMap;
use std::sync::{LazyLock, OnceLock, RwLock};
use uuid::Uuid;
#[derive(Clone)]
pub struct MAuthInfo {
app_id: Uuid,
sign_with_v1_also: bool,
signer: Signer,
mauth_uri_base: Url,
allow_v1_auth: bool,
}
static CLIENT: OnceLock<ClientWithMiddleware> = OnceLock::new();
static PUBKEY_CACHE: LazyLock<RwLock<HashMap<Uuid, Verifier>>> =
LazyLock::new(|| RwLock::new(HashMap::new()));
#[cfg(feature = "axum-service")]
pub mod axum_service;
pub mod config;
#[cfg(test)]
mod protocol_test_suite;
mod reqwest_middleware;
pub mod sign_outgoing;
#[cfg(feature = "axum-service")]
pub mod validate_incoming;