feat: M2 收尾 — 适配器补全 / 修复死路由 / 账号池 OAuth PKCE 核心#1
Merged
Conversation
added 5 commits
June 7, 2026 23:30
- Flow.Start/Callback 实装(此前为 ErrNotImplemented 占位) - 新增 PKCE(verifier/S256 challenge)与一次性 state 存储(Redis/内存两实现) - provider 改为 AuthCodeURL + ExchangeCode + ExchangeRefreshToken - config 增加 auth_url/redirect_uri/scopes;wire 注入 Redis state store - 配套单测:PKCE 往返、未知 state、授权 URL 参数、授权码换凭证 尚未接线:admin HTTP 触发端点(start/callback 路由)与真实 IdP 冒烟。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更
/settings与/notices路由(WireAdminSetting/WireAdminNotice从未被调用 —— handler 已实现且有测试,却是死路由)Flow.Start/Callback实装、PKCE S256、一次性 state Redis/内存双实现、providerAuthCodeURL/ExchangeCode、config 增auth_url/redirect_uri/scopes)动机
M2 收尾遗留项清理。其中 settings/notices 死路由是排查
// TODO时挖出的真 bug。测试方式
go build ./...✓ ·go test ./...✓(50 包全绿)尚未完成 / 后续
oauth_*_auth_url/redirect_uri/client_id/scopes(账号池授权端点为非标准值)Breaking change
internal/account/oauth.Provider接口(Start/Callback → AuthCodeURL/ExchangeCode)、NewFlow增 StateStore 参数。不影响对外 API。