Skip to content

Commit 06cd85a

Browse files
committed
fix(auth): satisfy oauth query CI checks
1 parent 66683e1 commit 06cd85a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/mcp/client/auth/oauth2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import secrets
1010
import string
1111
import time
12-
from collections.abc import AsyncGenerator, Awaitable, Callable
12+
from collections.abc import AsyncGenerator, Awaitable, Callable, Mapping
1313
from dataclasses import dataclass, field
1414
from typing import Any, Protocol
1515
from urllib.parse import parse_qsl, quote, urlencode, urljoin, urlparse, urlunparse
@@ -54,7 +54,7 @@
5454
logger = logging.getLogger(__name__)
5555

5656

57-
def build_authorization_url(auth_endpoint: str, auth_params: dict[str, str]) -> str:
57+
def build_authorization_url(auth_endpoint: str, auth_params: Mapping[str, str | None]) -> str:
5858
"""Append OAuth authorization parameters to an endpoint that may already include query params."""
5959
parsed_endpoint = urlparse(auth_endpoint)
6060
query_params = [

tests/interaction/auth/test_authorize_token.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ async def test_scope_is_selected_from_the_www_authenticate_challenge_over_prm_me
341341
assert json.loads(register.content)["scope"] == "from-header"
342342

343343

344+
@requirement("client-auth:resource-parameter")
344345
async def test_authorization_endpoint_existing_query_params_are_preserved() -> None:
345346
"""Authorization metadata endpoints may include provider-required query params."""
346347
provider = InMemoryAuthorizationServerProvider()

0 commit comments

Comments
 (0)