modelcontextprotocol / modelcontextprotocol/php-sdk

[Client] Support token_endpoint_auth_method: client_secret_basic, client_secret_post, none

未关闭
#321 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

auth Client enhancement improves spec compliance
主要语言
PHP
星标
1.6k
派生
173
平均合并
2 天 49 分钟
30 天内合并 PR
23

描述

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 Basic Authorization: Basic base64(client_id:client_secret)
  • client_secret_post → form-encoded client_id + client_secret body params
  • none → public client; only client_id in 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先检查 TokenEndpointAuthInterface 的范围以及依赖项 #318 和 #319 中的工作,然后跟踪 AS 元数据如何公开 token_endpoint_auth_methods_supported。将一致性场景 auth/token-endpoint-auth-basic、auth/token-endpoint-auth-post 和 auth/token-endpoint-auth-none 与单元测试结合使用;当三种策略都得到覆盖且三个基线场景都通过时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
php
领域
authentication
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。