Skip to main content

Module bearer

Module bearer 

Source
Expand description

Matching an Authorization header against the configured bearer token.

Split from mod.rs rather than added to it because that file is near its complexity budget, and because this is one self-contained decision: given what a client sent and what the endpoint expects, does the request get in.

Structs§

BearerPolicy
Which token a running endpoint currently requires.

Constants§

BEARER 🔒
The auth scheme this endpoint speaks, compared case-insensitively.

Functions§

bearer_matches
Whether presented — the raw Authorization header value, or None when the client sent none — carries expected_key.