modelcontextprotocol / modelcontextprotocol/php-sdk

[Client] Implement Dynamic Client Registration (RFC 7591) + pre-registered client support

Đang mở
#320 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

auth Client enhancement improves spec compliance
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) to registration_endpoint.
    • Persist returned client_id / client_secret / client_secret_expires_at via TokenStorageInterface.
  • 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-registration passes.

cc @soyuka

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.