Skip to content

feat: expose OAuth metadata discovery provenance#1043

Closed
tsarlandie-oai wants to merge 1 commit into
modelcontextprotocol:mainfrom
tsarlandie-oai:codex/rmcp-1037-oauth-discovery-provenance
Closed

feat: expose OAuth metadata discovery provenance#1043
tsarlandie-oai wants to merge 1 commit into
modelcontextprotocol:mainfrom
tsarlandie-oai:codex/rmcp-1037-oauth-discovery-provenance

Conversation

@tsarlandie-oai

Copy link
Copy Markdown

Summary

  • add AuthorizationMetadataSource and DiscoveredAuthorizationMetadata
  • add backward-compatible AuthorizationManager::discover_metadata_with_source()
  • identify protected-resource metadata, authorization-server metadata, and synthesized legacy endpoint fallback
  • preserve the existing discover_metadata() result and legacy conformance behavior

Why

OAuth discovery returned normalized authorization metadata without retaining where it came from. Callers therefore could not distinguish standards-based protected-resource or authorization-server discovery from the synthesized legacy fallback.

The new API exposes that provenance while leaving the existing discovery API and behavior unchanged.

Validation

  • comprehensive regression suite: 516 tests passed
  • whole-workspace formatting check passed
  • all-target, all-feature Clippy passed with the documented beta-only toolchain warning suppressed

Fixes #1037

@github-actions github-actions Bot added T-core Core library changes T-transport Transport layer changes labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OAuth discovery should distinguish discovered authorization metadata from synthesized legacy endpoints

1 participant