Expand description
Authentication middleware helpers for HTTP routes.
Functionsยง
- check_
auth - Check that the request carries a valid key with the given permission.
Returns
Err((StatusCode::UNAUTHORIZED, message))on failure. - extract_
bearer - Extract the raw key from
Authorization: Bearer <key>. - resolve_
principal - Resolve the requesting
Principalfrom the request headers.