AuthResult
Type Alias: AuthResult
Section titled “Type Alias: AuthResult”AuthResult =
string| {header?:string;scheme?:string;token:string; } |null|undefined
Defined in: packages/fetch-kit/src/types.ts:128
Result returned by an AuthFn.
string— used as the value of theAuthorizationheader verbatim. Caller is responsible for any scheme prefix, e.g."Bearer xyz","Basic dXNlcjpwYXNz","Token xyz", or a raw API key.- Object form — set a custom header (e.g.
"X-Api-Key") and value, and/or keep the convenience of providing scheme + token separately. null/undefined— no auth header added for this request.
Union Members
Section titled “Union Members”string
Type Literal
Section titled “Type Literal”{ header?: string; scheme?: string; token: string; }
header?
Section titled “header?”
optionalheader?:string
Header name. Defaults to "Authorization".
scheme?
Section titled “scheme?”
optionalscheme?:string
Optional scheme prefix joined to token with a single space.
Omit to pass token through verbatim — useful for custom schemes
or API-key headers that take a raw value.
token:
string
The credential value (or full header value when scheme is omitted).
null
undefined