fix(auth): match complete WWW-Authenticate parameters
Closed
TA
14d ago+196+196+012345678901234567890123456789-7-7-0123456789
Summary
- match WWW-Authenticate auth-param names only at parameter boundaries
- prevent suffix matches such as
error_scopesatisfyingscope - add regressions for
scopeandresource_metadataprefixed parameters
Test plan
uv run pytest tests/client/test_auth.py::TestWWWAuthenticate -quv run ruff check src/mcp/client/auth/utils.py tests/client/test_auth.pyuv run pyright src/mcp/client/auth/utils.py tests/client/test_auth.pygit diff --check
Related: https://github.com/modelcontextprotocol/python-sdk/issues/2902