hodei_authz_axum/lib.rs
1//! Axum integration for Hodei authorization framework
2//!
3//! This crate provides middleware and extractors for Axum web framework.
4//!
5//! # Example
6//!
7//! ```rust,ignore
8//! use hodei_authz_axum::{AuthenticatedUser, authorize_middleware};
9//! use axum::{Router, routing::get};
10//!
11//! async fn protected_handler(
12//! AuthenticatedUser(user): AuthenticatedUser<User>,
13//! ) -> impl IntoResponse {
14//! Json(user)
15//! }
16//!
17//! // let app = Router::new()
18//! // .route("/protected", get(protected_handler))
19//! // .layer(middleware::from_fn(authorize_middleware));
20//! ```
21
22// pub mod extractors; // Temporarily disabled - needs fixing
23pub mod middleware;
24
25// pub use extractors::{AuthenticatedUser, AuthError};
26pub use middleware::authorize_middleware;