Skip to main content

Module credential

Module credential 

Expand description

Credential: what an AuthProvider says about a request before authenticating it — whether the request carries the provider’s kind of credential at all (ADR 0021 §4, cratestack#1243).

Two callers ask:

  • the first-success chain, which skips a member whose credential is Credential::Absent without calling it, so a strict provider (one that refuses a request without its credential) can sit in a chain;
  • MCP Streamable HTTP, when a deployment opts in with CredentialPresence::ask_provider(), to answer a request without a credential with its 401 challenge before the body is read.

The answer is read from the request head: the method, path, query, headers and extensions. The body may be empty when the provider is asked (MCP asks before reading it), so a provider never looks for its credential there.

Enums§

Credential
Whether a request carries a provider’s credential. See the module documentation.