-
Notifications
You must be signed in to change notification settings - Fork 248
Feature/ldap authentication #356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xuebkgithub
wants to merge
12
commits into
Wei-Shaw:main
Choose a base branch
from
xuebkgithub:feature/ldap-authentication-clean
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/ldap authentication #356
xuebkgithub
wants to merge
12
commits into
Wei-Shaw:main
from
xuebkgithub:feature/ldap-authentication-clean
Conversation
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
- 实现 LDAP 客户端封装,支持 LDAP/LDAPS/StartTLS 连接 - 添加 LDAP 配置结构和默认值 - 实现 LDAP 认证服务,支持首次登录自动创建用户 - 添加 LDAP 登录 HTTP 端点和路由 - 配置 Wire 依赖注入,支持可选 LDAP 客户端
- 添加 LDAPLoginRequest 类型定义 - 实现 ldapLogin API 调用方法 - 扩展登录页面,添加 LDAP 登录逻辑和状态管理
- 在 config.example.yaml 中添加完整的 LDAP 配置段 - 支持 LDAP/LDAPS/StartTLS 三种连接方式 - 包含管理员绑定和用户搜索配置 - 提供用户属性映射选项(用户名、邮箱、显示名称) - 添加详细的中英文注释说明 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- 移除 ldapLogin API 导入 - 移除 loginType 状态管理(email/ldap 切换) - 移除 ldapFormData 和 ldapErrors 响应式对象 - 移除 handleLDAPLogin 函数实现 - 简化登录流程,仅保留邮箱/密码登录方式
- 添加 go-ldap/ldap/v3 v3.4.10 依赖包 - 支持 LDAP 认证功能所需的核心库
- 修正导入路径从 backend/internal/config 到 internal/config - 确保与项目 Go module 结构一致 - 修复模块导入错误
- 在后端构建阶段添加 go mod tidy 步骤 - 修复 LDAP 认证依赖添加后 go.sum 未更新的问题 - 确保 Docker 镜像构建时依赖校验通过 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
86fd7d1 to
1245f07
Compare
- 合并 origin/main 的最新提交(包含 SSE 流式响应修复、TOTP 2FA、密码重置等功能) - 保留 LDAP 认证功能 - 解决合并冲突: - backend/internal/handler/auth_handler.go:同时保留 LDAP 登录和密码重置功能 - backend/internal/server/routes/auth.go:同时注册 LDAP 和 2FA 路由 - backend/internal/service/auth_service.go:同时保留 LDAP 认证和密码重置方法 - frontend/src/api/auth.ts:同时导出 ldapLogin 和 login2FA 方法 - 所有功能互补,无冲突逻辑
- 在authStore中添加ldapLogin方法,确保登录后正确更新store状态 - 修改LDAPLoginSection组件使用authStore.ldapLogin()替代直接API调用 - 恢复auth_service.go中被误删的LDAP登录成功日志 - 修复登录成功后无法自动跳转到dashboard的问题(需手动刷新) Closes #修复LDAP登录bug
- 在UserRepository中添加GetByUsername方法支持LDAP用户查询 - 在Wire依赖注入中添加LDAP客户端Provider - 添加LDAP相关的前端国际化翻译(中英文) - 在登录页面添加LDAP登录入口 - 在系统设置中添加LDAP配置选项 - 完善LDAP认证的前后端集成
- 在Dockerfile中添加Wire代码生成步骤 - 删除wire_gen.go(改为构建时自动生成) - 更新Go依赖(LDAP、TOTP、缓存等库) - 确保Docker构建时依赖注入代码正确生成
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.
添加对于ldap的支持.用于多用户登录