modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] Support token_endpoint_auth_method: client_secret_basic, client_secret_post, none
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- PHP
- Star
- 1.6k
- Fork
- 173
- Merge trung bình
- 2 ngày 49 phút
- Pull request đã merge (30 ngày)
- 23
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng việc xem xét phạm vi của TokenEndpointAuthInterface và công việc trong các dependency #318 và #319, sau đó theo dõi cách metadata AS expose token_endpoint_auth_methods_supported. Sử dụng các kịch bản conformance auth/token-endpoint-auth-basic, auth/token-endpoint-auth-post và auth/token-endpoint-auth-none cùng với các unit test; được xem là hoàn tất khi cả ba strategy đều được bao phủ và cả ba baseline scenario đều pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- php
- Lĩnh vực
- authentication
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100