[Client] Implement refresh_token grant + offline_access scope
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- php
調査の方向性
Mcp\Client\Auth\Grant\RefreshTokenGrant から始め、access/refresh token と scope の処理フローについて依存関係 #319 と #322 を確認してください。認証の適合性シナリオ auth/offline-access-scope と auth/offline-access-not-supported を実行し、その後、プロアクティブおよびリアクティブな refresh、degradation、そしてクリーンな再認証のために要求されている単体テストのカバレッジを追加してください。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- PHP
- スター
- 1.6k
- フォーク
- 173
- 平均マージ
- 2日 49分
- マージ済み PR(30日)
- 23
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/php-sdk のほかの issue
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan オープンServer
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
modelcontextprotocol/php-sdk#468 · コメント 2 件 ·
-
needs confirmation needs maintainer action Server
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modelcontextprotocol/php-sdk#398 · リアクション 1 件 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modelcontextprotocol/php-sdk#370 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
modelcontextprotocol/php-sdk#510 · コメント 1 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
modelcontextprotocol/php-sdk#504 ·
modelcontextprotocol/php-sdk の issue をすべて見る
似ている issue
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
-
Перевод устарел
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100