Expand description
Basic HTTP Authentication middleware
Provides a simple username/password authentication layer for protecting admin endpoints.
§Example
ⓘ
use at_jet::middleware::BasicAuthLayer;
let app = Router::new()
.route("/admin", get(admin_handler))
.route("/health", get(health_handler))
.layer(BasicAuthLayer::new("admin", "secret").exclude("/health"));Structs§
- Basic
Auth Config - Basic Authentication configuration
- Basic
Auth Layer - Basic Authentication Layer
- Basic
Auth Middleware - Basic Authentication middleware service
Functions§
- basic_
auth_ middleware - Middleware function for use with
axum::middleware::from_fn_with_state