[Client] Implement refresh_token grant + offline_access scope
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- php
- Lĩnh vực
- authentication, authorization
Hướng nghiên cứu
Bắt đầu với Mcp\Client\Auth\Grant\RefreshTokenGrant và xem xét các dependency #319 và #322 cho flow xử lý access/refresh token và scope. Chạy các kịch bản conformance auth/offline-access-scope và auth/offline-access-not-supported, sau đó thêm unit test coverage được yêu cầu cho refresh chủ động và phản ứng, degradation và hành vi re-auth sạch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
When an access token expires, the client must transparently refresh using the stored refresh_token rather than re-prompting the user. Per OIDC/OAuth, offline_access scope is requested at authorize time when the AS advertises it; otherwise the client degrades gracefully (no refresh available).
Scope
Mcp\Client\Auth\Grant\RefreshTokenGrant.- Pre-flight check: if
expires_at - now() < skew, refresh before sending request. - Reactive: on
401with valid refresh token, refresh + retry once. - Request
offline_accessscope at authorize time whenscopes_supportedcontains it; otherwise omit. - If the AS does not advertise offline_access and tokens expire, surface a re-auth signal cleanly (no infinite loop).
Conformance scenarios unblocked
auth/offline-access-scope, auth/offline-access-not-supported.
Dependencies
Blocked by: #319 (need access+refresh tokens from auth code flow), #322 (scope handling).
Acceptance
- Unit tests for proactive + reactive refresh, no-refresh-token degradation, no-offline_access degradation.
- Conformance: 2 baseline scenarios pass.
cc @soyuka
- 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
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.
Issue khác của modelcontextprotocol/php-sdk
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan Đang mởServer
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/php-sdk#468 · 2 bình luận ·
-
needs confirmation needs maintainer action Server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/php-sdk#398 · 1 reaction ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/php-sdk#370 ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
modelcontextprotocol/php-sdk#510 · 1 bình luận ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
modelcontextprotocol/php-sdk#504 ·
Tất cả issue của modelcontextprotocol/php-sdk
Issue tương tự
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Automattic/blocks-engine#2161 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/static-site-importer#1824 ·
-
[Chore] Keep one viget-block-generator skill and replicate it, instead of four tracked copies Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Cannot reset column width Đang mở0. Needs triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
0. Needs triage 35-feedback bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100