Bounded final-profile discovery for one installed MCP OAuth authority.
Discovery performs one unauthenticated server/discover, parses at most one
Bearer challenge, resolves Protected Resource Metadata, then tries RFC 8414
and OpenID metadata candidates in MCP priority order. A challenge-directed
resource metadata URL is authoritative and never falls through.
Summary
Types
@type binding() :: %{ protected_resource: map(), authorization_server: map(), client: map(), requested_scopes: MapSet.t(binary()), required_scopes: MapSet.t(binary()), refresh_authorized: boolean(), revalidation_required: boolean(), freshness_ttl_ms: non_neg_integer(), freshness_anchor_ttl_ms: non_neg_integer(), freshness_deadline_ms: integer() }
Functions
@spec discover( PtcRunner.Kernel.MCPOAuth.Authority.t(), keyword() ) :: {:ok, binding()} | {:error, atom()}