Skip to content

Commit 45a16a8

Browse files
authored
Update grant types validation logic in register.py
1 parent ca34666 commit 45a16a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mcp/server/auth/handlers/register.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ async def handle(self, request: Request) -> Response:
6868
),
6969
status_code=400,
7070
)
71-
if set(client_metadata.grant_types) != {"authorization_code", "refresh_token"}:
71+
if not {"authorization_code", "refresh_token"}.issubset(set(client_metadata.grant_types)):
7272
return PydanticJSONResponse(
7373
content=RegistrationErrorResponse(
7474
error="invalid_client_metadata",
75-
error_description="grant_types must be authorization_code and refresh_token",
75+
error_description="grant_types must contain authorization_code and refresh_token",
7676
),
7777
status_code=400,
7878
)

0 commit comments

Comments
 (0)