Skip to content

fix: support "form_post" to be one of response modes in authorization server metadata validation #1046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ke-yu
Copy link

@ke-yu ke-yu commented Jun 27, 2025

Add form_post to OAuthMetadta.response_modes_supported array.

Motivation and Context

"form_post" is one of valid values - RFC 8414 OAuth 2.0 Authorization Server Metadata

response_modes_supported
OPTIONAL. JSON array containing a list of the OAuth 2.0 "response_mode" values that this authorization server supports, as specified in "OAuth 2.0 Multiple Response Type Encoding Practices" [OAuth.Responses]. If omitted, the default is "["query", "fragment"]". The response mode value "form_post" is also defined in "OAuth 2.0 Form Post Response Mode" [OAuth.Post].

Currently if authorization server metadata endpoint returns response_mode_supported that contains form_post, the validation will fail:

validation error for OAuthMetadata
response_modes_supported.1
  Input should be 'query' or 'fragment' [type=literal_error, input_value='form_post', input_type=str]
    For further information visit https://errors.pydantic.dev/2.11/v/literal_error

How Has This Been Tested?

Tested locally, ensure authorize goes to the authorization server that passed to simple auth server.

Breaking Changes

No.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@ke-yu ke-yu changed the title Support "form_post" to be one of resonse modes in Authoriazation Server metadata validation fix: support "form_post" to be one of resonse modes in Authoriazation Server metadata validation Jun 27, 2025
@ke-yu ke-yu changed the title fix: support "form_post" to be one of resonse modes in Authoriazation Server metadata validation fix: support "form_post" to be one of response modes in Authorization Server metadata validation Jun 28, 2025
@ke-yu ke-yu changed the title fix: support "form_post" to be one of response modes in Authorization Server metadata validation fix: support "form_post" to be one of response modes in authorization server metadata validation Jun 28, 2025
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.

1 participant