Skip to content

Conversation

@shoummu1
Copy link
Collaborator

@shoummu1 shoummu1 commented Oct 31, 2025

📌 Summary

Adds application/x-www-form-urlencoded content-type support to the gateway testing interface, enabling proper testing of OAuth2 token endpoints.

OAuth2 token endpoints require application/x-www-form-urlencoded requests. Current implementation only supports JSON, making OAuth2 testing impossible via admin UI.

🔗 Related Issue

Closes: #1111

📐 Changes

  • Backend: Add content-type detection in /admin/gateways/test endpoint
  • Schema: Add content_type field to GatewayTestRequest (default: application/json)
  • UI: Add content-type dropdown to gateway test modal
  • JS: Dynamic label updates based on content-type selection

🧪 Testing

  • ✅ Unit tests for form-urlencoded handling
  • ✅ Integration tests for both content types
  • ✅ Manual testing with OAuth2 endpoints

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • Fully backward compatible - defaults to application/json

@shoummu1 shoummu1 marked this pull request as ready for review October 31, 2025 12:31
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.

[Feature Request]: Support application/x-www-form-urlencoded Requests in MCP Gateway UI for OAuth2 / Keycloak Integration

2 participants