| Crates.io | ubl-axum-kit |
| lib.rs | ubl-axum-kit |
| version | 0.2.0 |
| created_at | 2026-01-14 09:46:04.301352+00 |
| updated_at | 2026-01-14 09:46:04.301352+00 |
| description | Shared Axum middleware for UBL services: JWT/PoP verification, rate limiting, tenant extraction |
| homepage | https://logline.foundation |
| repository | https://github.com/danvoulez/ubl-services |
| max_upload_size | |
| id | 2042520 |
| size | 54,813 |
Shared Axum middleware for UBL services.
ubl-authubl-iduse ubl_axum_kit as kit;
// Extract actor from headers
let actor = kit::actor_from_headers(&headers, &jwks_uri, Some(&tenant)).await?;
// Rate limiting
if !store.limiter.allow(&tenant, &actor.did, 100) {
return Err(kit::ApiError { error: "rate limit".into(), ... });
}
// Standard responses
kit::ApiOk(json!({ "data": value }))
kit::ApiError { error, code, trace_id }
kit::ApiNotFound { error, trace_id }
MIT OR Apache-2.0