Skip to content

Conversation

@gazzadownunder
Copy link

Updated the Dynamic Client Registration (DCR) handler to comply with RFC 7591 by making the refresh_token grant type optional. Previously, the handler incorrectly required both authorization_code and refresh_token grant types, which was unnecessarily restrictive and non-compliant with the RFC.

Changes:

  • Modified grant_types validation to only require authorization_code
  • Updated error message to reflect the new requirement
  • Renamed test to test_client_registration_with_authorization_code_only
  • Added test for missing authorization_code (now the true error case)
  • Updated test assertions to match new validation behavior

This change improves RFC 7591 compliance and provides clients with greater flexibility in their registration options.

Github-Issue: #1650

Updated the Dynamic Client Registration (DCR) handler to comply with RFC 7591
by making the refresh_token grant type optional. Previously, the handler
incorrectly required both authorization_code and refresh_token grant types,
which was unnecessarily restrictive and non-compliant with the RFC.

Changes:
- Modified grant_types validation to only require authorization_code
- Updated error message to reflect the new requirement
- Renamed test to test_client_registration_with_authorization_code_only
- Added test for missing authorization_code (now the true error case)
- Updated test assertions to match new validation behavior

This change improves RFC 7591 compliance and provides clients with greater
flexibility in their registration options.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Github-Issue: modelcontextprotocol#1650
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