modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] Support token_endpoint_auth_method: client_secret_basic, client_secret_post, none
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.6k
- Forks
- 173
- Avg merge
- 2d 49m
- Merged PRs (30d)
- 23
Description
Context
Per RFC 6749 §2.3 (and AS metadata token_endpoint_auth_methods_supported), the client must send its credentials to the token endpoint using whichever method the AS advertises:
client_secret_basic→ HTTP BasicAuthorization: Basic base64(client_id:client_secret)client_secret_post→ form-encodedclient_id+client_secretbody paramsnone→ public client; onlyclient_idin body, no secret
Scope
- Strategy interface
TokenEndpointAuthInterface+ three implementations. - Auto-select implementation based on AS metadata's preferred method (intersect with what the client supports/has).
Conformance scenarios unblocked
auth/token-endpoint-auth-basic, auth/token-endpoint-auth-post, auth/token-endpoint-auth-none.
Dependencies
Blocked by: #318, #319.
Acceptance
- Unit tests per strategy.
- Conformance: 3 baseline scenarios pass.
cc @soyuka
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the TokenEndpointAuthInterface scope and the work in dependencies #318 and #319, then trace how AS metadata exposes token_endpoint_auth_methods_supported. Use the auth/token-endpoint-auth-basic, auth/token-endpoint-auth-post, and auth/token-endpoint-auth-none conformance scenarios alongside unit tests; done means all three strategies are covered and the three baseline scenarios pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100