Passing ACR_VALUES TO Token Endpoint
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- csharp
- 领域
- api, authentication
调研方向
从 ClientOAuthProvider 开始,重点查看 ExchangeCodeForTokenAsync 以及 BuildAuthorizationUrl 中现有的 _additionalAuthorizationParameters 处理方式。跟踪 token 请求和 refresh 请求的构造方式,然后检查周围是否存在相关测试。完成标准是:支持请求的附加参数用于 token 交换和 refresh,同时保留 RFC 6749 中描述的 endpoint 行为。
由索引模型根据 Issue 内容生成。
描述
The ClientOAuthProvider can manage acr requests to the authorize endpoint via the _additionalAuthorizationParameters but the token endpoint does not support additional parameters.
internal sealed partial class ClientOAuthProvider
{
private readonly IDictionary<string, string> _additionalAuthorizationParameters;
}
...
private Uri BuildAuthorizationUrl(
ProtectedResourceMetadata protectedResourceMetadata,
AuthorizationServerMetadata authServerMetadata,
string codeChallenge)
{
...
foreach (var kvp in _additionalAuthorizationParameters)
{
queryParamsDictionary.Add(kvp.Key, kvp.Value);
}
var queryParams = HttpUtility.ParseQueryString(string.Empty);
foreach (var kvp in queryParamsDictionary)
{
queryParams[kvp.Key] = kvp.Value;
}
var uriBuilder = new UriBuilder(authServerMetadata.AuthorizationEndpoint)
{
Query = queryParams.ToString()
};
BUT IN only the token endpoint is used. No additional params are passed. This is needed for multitenancy support.
private async Task<TokenContainer> ExchangeCodeForTokenAsync(
ProtectedResourceMetadata protectedResourceMetadata,
AuthorizationServerMetadata authServerMetadata,
string authorizationCode,
string codeVerifier,
CancellationToken cancellationToken)
....
using var request = new HttpRequestMessage(HttpMethod.Post, authServerMetadata.TokenEndpoint)
{
Content = requestContent
};
Please see https://www.rfc-editor.org/rfc/rfc6749#section-3.2 for Token Endpoint Spec as it is supported and part of spec.
The endpoint URI MAY include an "application/x-www-form-urlencoded"
formatted (per Appendix B) query component ([RFC3986] Section 3.4),
which MUST be retained when adding additional query parameters. The
endpoint URI MUST NOT include a fragment component.
Can this please be added to ClientOAUthProvider for ExchangeToken and Refresh Token please
- 主要语言
- C#
- 星标
- 4.6k
- 派生
- 819
- 平均合并
- 8 天 7 小时
- 30 天内合并 PR
- 3
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/csharp-sdk 的其他 Issue
-
ClaimsPrincipal parameter injection sample request可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
modelcontextprotocol/csharp-sdk#1899 ·
维护者通常 1 天内回复
-
Document ClientOAuthOptions.ScopeSelector usage可能已有人在做 @z0rimo 于 24 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/csharp-sdk#1867 · 1 条评论 ·
维护者通常 1 天内回复
-
HTTP+SSE client: POST responses are never disposed, leaking one connection per sent message可能已有人在做 @yalcinfu22 于 39 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 条评论 ·
维护者通常 1 天内回复
-
stdio client never closes the server's stdin, so every client dispose burns the full ShutdownTimeout (5s by default)可能已有人在做 @luisangelrod 于 40 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
modelcontextprotocol/csharp-sdk#1836 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement needs confirmation
难度 2/5 1-3 小时 新手友好度 64/100
modelcontextprotocol/csharp-sdk#678 · 1 条评论 ·
维护者通常 1 天内回复
查看 modelcontextprotocol/csharp-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
PCL-Community/PCL-CE#3652 ·
维护者通常 1 天内回复
-
area:frontend bug FE P3
难度 2/5 1-3 小时 新手友好度 68/100
klasolsson81/jobbliggaren#2010 ·
维护者通常 1 天内回复
-
agentic-workflows untriaged
难度 1/5 1 小时以内 新手友好度 65/100
维护者通常 1 天内回复
-
area: homeblaze type: bug
难度 2/5 1-3 小时 新手友好度 74/100
RicoSuter/Namotion.Interceptor#630 ·
维护者通常 1 天内回复
-
Akka.Hosting enhancement
难度 2/5 1-3 小时 新手友好度 65/100