Skip to main content

require_bearer

Function require_bearer 

Source
pub fn require_bearer(
    headers: &HeaderMap,
    expected: &str,
) -> Result<(), AppError>
Expand description

Verify the incoming Authorization header against the configured token. Returns Ok(()) on match, RFC-9457 Unauthorized otherwise.