Accept additional response_types values from OAuth servers (#1323)

This commit is contained in:
Jon Shea 2025-09-26 15:29:06 -04:00 • committed by GitHub
commit 1940040ac3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,6 +77,17 @@ class RegistrationHandler:
status_code=400,
)
# The MCP spec requires servers to use the authorization `code` flow
# with PKCE
if "code" not in client_metadata.response_types:
return PydanticJSONResponse(
content=RegistrationErrorResponse(
error="invalid_client_metadata",
error_description="response_types must include 'code' for authorization_code grant",
),
status_code=400,
)
client_id_issued_at = int(time.time())
client_secret_expires_at = (
client_id_issued_at + self.options.client_secret_expiry_seconds