modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] Implement Dynamic Client Registration (RFC 7591) + pre-registered client support
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
When no client credentials are pre-configured and AS metadata advertises registration_endpoint, the client must POST client_metadata to register itself dynamically. When credentials are pre-provided via Builder, skip registration.
Scope
Mcp\Client\Auth\DynamicClientRegistrar:- POST
client_metadata(client_name, redirect_uris, grant_types, token_endpoint_auth_method, software_id, software_version) toregistration_endpoint. - Persist returned
client_id/client_secret/client_secret_expires_atviaTokenStorageInterface.
- POST
Client\Builder::setOAuthClient(string $clientId, ?string $clientSecret = null)for pre-registration.
Conformance scenarios unblocked
auth/pre-registration (and unblocks every other auth scenario by providing a client_id).
Dependencies
Blocked by: #318 (AS metadata gives registration_endpoint).
Acceptance
- Unit tests for registration request shape + pre-registration bypass.
- Conformance:
auth/pre-registrationpasses.
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 với phần công việc về siêu dữ liệu AS trong #318, sau đó kiểm tra Mcp\Client\Auth\DynamicClientRegistrar, Client\Builder và TokenStorageInterface. Chạy kịch bản tuân thủ auth/pre-registration và thêm các unit test được yêu cầu cho cấu trúc yêu cầu đăng ký và việc bỏ qua pre-registration. Hoàn thành khi kịch bản chạy thành công và thông tin xác thực được trả về đã được lưu bền vững.
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
- api, 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
- 52/100