rok-auth-basic
HTTP Basic Authentication middleware for Axum. Validates Authorization: Basic ...
headers against a configurable credential store.
Installation
[]
= { = "0.1" }
Quick Start
use ;
// Static credentials (for internal APIs / health checks)
let basic = static_credentials;
let app = new
.route
.layer;
// Returns 401 + WWW-Authenticate header if credentials are missing or wrong
Dynamic Validation (database)
let basic = new;
Extracting the Authenticated User
async