Expand description
Raw extraction of the sensitive Authorization field.
In addition to raw field extraction, this module can route the common Bearer and Basic schemes to borrowed credential strings. It does not validate tokens, decode Basic credentials, fully validate the Authorization grammar, or authenticate requests. Returned values are sensitive and must not be logged or echoed; extraction errors never contain them.
Standards context: the HTTP authentication framework is defined by RFC 9110 Section 11, Bearer usage by RFC 6750 Section 2.1, and Basic by RFC 7617 Section 2. The helpers here only recognize a scheme and return its raw credential string; they do not implement authentication, complete RFC syntax validation, or Basic decoding.
Functionsยง
- extract_
header_ authorization - Extract the singular
Authorizationfield as text. - extract_
header_ basic_ credentials - Extract raw Basic credentials from the
Authorizationfield. - extract_
header_ bearer_ token - Extract raw Bearer credentials from the
Authorizationfield. - extract_
request_ authorization - Extract the raw
Authorizationfield from a complete request. - extract_
request_ basic_ credentials - Extract raw Basic credentials from a complete request.
- extract_
request_ bearer_ token - Extract raw Bearer credentials from a complete request.