Skip to content

Conversation

@xiaoyijun
Copy link
Contributor

According to the RFC, the supported scopes filed name should be scopes_supported rather than scope_supported.

@xiaoyijun xiaoyijun requested a review from gao-sun July 10, 2025 03:44
@xiaoyijun xiaoyijun self-assigned this Jul 10, 2025
@codecov
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@gao-sun gao-sun requested a review from Copilot July 10, 2025 04:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aligns the OAuth metadata field name with RFC8414 by replacing scope_supported with scopes_supported.

  • Renamed scope_supported to scopes_supported in the metadata model and updated its docstring.
  • Updated existing tests to check scopes_supported instead of the old field.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/utils/fetch_server_config_test.py Added assertions for the new scopes_supported field
mcpauth/config.py Renamed attribute and added RFC link in its docstring
Comments suppressed due to low confidence (2)

mcpauth/config.py:141

  • Consider adding a fallback for servers that still emit the older scope_supported key (e.g., via Pydantic's Field(alias='scope_supported', alias_priority=2)) to maintain broader interoperability.
    scopes_supported: Optional[List[str]] = None

mcpauth/config.py:143

  • [nitpick] Attribute-level docstrings aren't picked up by many tools; consider using Field(..., description="...") so the description becomes part of the Pydantic model schema and generated docs.
    JSON array containing a list of the OAuth 2.0 `scope` values that this authorization

@xiaoyijun xiaoyijun merged commit 0d3c6ac into master Jul 10, 2025
6 checks passed
@xiaoyijun xiaoyijun deleted the xiaoyijun-fix-auth-server-metadata branch July 10, 2025 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants