auth/credential_headers.ts view source
(authorization_lines: readonly string[]): string | null import {read_bearer_token} from '@fuzdev/fuz_app/auth/credential_headers.js'; Read the API token out of the request's Authorization lines.
The header must be exactly one line: the scheme Bearer in any ASCII case,
one SP, and a value is_api_token_shaped accepts — nothing before, between,
or after. A header sent twice is discarded whatever its lines hold, never
resolved to one of them.
A runtime that shows no per-line view (get_header_lines) hands repeated
lines over as one, joined with , . No token holds a comma, so the join
fails the shape and is discarded as the repeat it is; a lone line that
happens to hold , reads the same on both spines.
authorization_lines
the Authorization header's lines
readonly string[]returns
string | null
the token to look up, or null when the header carries none