Parse and format WWW-Authenticate challenges (RFC 9110 §11.6.1), as used
by the MCP authorization spec to point clients at protected-resource
metadata and signal insufficient_scope step-up.
Summary
Functions
Format a challenge header value. params is an enumerable of name/value pairs.
Parse a challenge header value.
Types
Functions
Format a challenge header value. params is an enumerable of name/value pairs.
Parse a challenge header value.
iex> Noizu.MCP.Auth.WWWAuthenticate.parse(
...> ~s(Bearer resource_metadata="https://x/.well-known/oauth-protected-resource", error="invalid_token")
...> )
%Noizu.MCP.Auth.WWWAuthenticate{
scheme: "Bearer",
params: %{
"resource_metadata" => "https://x/.well-known/oauth-protected-resource",
"error" => "invalid_token"
}
}