# `Anubis.Client.Authorization.Challenge`

An HTTP authorization challenge, including the original `WWW-Authenticate` values.

`scope` is the server's requested scope string, independent of metadata's
`scopes_supported`. `parse_error` identifies malformed or ambiguous Bearer
challenges; discovery refuses to use them.

# `t`

```elixir
@type t() :: %Anubis.Client.Authorization.Challenge{
  error: String.t() | nil,
  error_description: String.t() | nil,
  headers: [String.t()],
  mcp_url: String.t(),
  parse_error: atom() | nil,
  resource_metadata: String.t() | nil,
  scope: String.t() | nil,
  status: pos_integer()
}
```

# `from_response`

```elixir
@spec from_response(String.t(), pos_integer(), [{String.t(), String.t()}]) :: t()
```

Extracts Bearer parameters from response headers without discarding the originals.

Header and parameter names are case insensitive. Multiple distinct Bearer
challenges are reported as ambiguous rather than selecting one implicitly.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
