feat(login, zulip): 引入 JWT 验证并重构 API 密钥管理 #33

Closed
ANGJustinl wants to merge 13 commits from ANGJustinl/whale-town-end:master into main

13 Commits

Author SHA1 Message Date
9483d6ab20 Merge pull request 'feat(login, zulip): 引入 JWT 验证并重构 API 密钥管理' (#3) from zulip_dev into master
Reviewed-on: ANGJustinl/whale-town-end#3
2026-01-06 19:05:13 +08:00
angjustinl
4165a4c03a Merge branch 'master' of https://gitea.xinghangee.icu/ANGJustinl/whale-town-end
* 'master' of https://gitea.xinghangee.icu/ANGJustinl/whale-town-end:
  feat(zulip): Add Zulip account management and integrate with auth system
2026-01-05 17:52:02 +08:00
angjustinl
2b87eac495 feat(zulip): Add Zulip account management and integrate with auth system
- Add ZulipAccountsEntity, repository, and module for persistent Zulip account storage
- Create ZulipAccountService in core layer for managing Zulip account lifecycle
- Integrate Zulip account creation into login flow via LoginService
- Add comprehensive test suite for Zulip account creation during user registration
- Create quick test script for validating registered user Zulip integration
- Update UsersEntity to support Zulip account associations
- Update auth module to include Zulip and ZulipAccounts dependencies
- Fix WebSocket connection protocol from ws:// to wss:// in API documentation
- Enhance LoginCoreService to coordinate Zulip account provisioning during authentication
2026-01-05 17:50:58 +08:00
fcb81f80d9 Merge pull request 'feat/websocket-remote-connection-fix' (#31) from feat/websocket-remote-connection-fix into main
Reviewed-on: #31
2026-01-05 11:23:51 +08:00
065d3f2fc6 Merge branch 'main' into feat/websocket-remote-connection-fix 2026-01-05 11:23:42 +08:00
moyin
f335b72f6d chore:删除多余的文档 2026-01-05 11:23:07 +08:00
moyin
3bf1b6f474 config:添加nginx WebSocket代理配置文件
- nginx.conf: 当前生产环境的nginx配置
- nginx_complete_fix.conf: 完整的WebSocket支持配置模板

包含WebSocket升级映射、HTTP重定向、SSL配置等完整方案
支持ws://到wss://的协议升级和重定向处理
2026-01-05 11:17:16 +08:00
moyin
38f9f81b6c test:添加WebSocket连接诊断和测试工具集
- test_zulip.js: Zulip集成功能的端到端测试脚本
- full_diagnosis.js: 全面的WebSocket连接诊断工具
- test_protocol_difference.js: 不同协议(ws/wss/http/https)的对比测试
- test_redirect_and_websocket.js: HTTP重定向和WebSocket升级测试
- test_websocket_handshake_redirect.js: WebSocket握手重定向机制验证
- websocket_with_redirect_support.js: 支持重定向的WebSocket连接实现

提供完整的WebSocket连接问题诊断和解决方案
2026-01-05 11:16:52 +08:00
moyin
4818279fac chore:更新项目依赖和配置
- 更新WebSocket相关依赖版本
- 优化项目配置以支持远程连接
- 确保依赖兼容性和安全性
2026-01-05 11:15:30 +08:00
moyin
270e7e5bd2 test:大幅扩展Zulip核心服务的测试覆盖率
- API密钥安全服务:新增422个测试用例,覆盖加密、解密、验证等核心功能
- 配置管理服务:新增515个测试用例,覆盖配置加载、验证、更新等场景
- 错误处理服务:新增455个测试用例,覆盖各种错误场景和恢复机制
- 监控服务:新增360个测试用例,覆盖性能监控、健康检查等功能

总计新增1752个测试用例,显著提升代码质量和可靠性
2026-01-05 11:14:57 +08:00
moyin
e282c9dd16 service:完善Zulip服务的连接管理和错误处理
- 增强WebSocket连接状态监控
- 优化错误处理和重连机制
- 完善服务层的日志记录
- 提升连接稳定性和可靠性

支持远程WebSocket连接的服务层改进
2026-01-05 11:14:22 +08:00
moyin
d8b7143f60 websocket:增强Zulip WebSocket网关的调试和监控功能
- 添加详细的连接和断开日志记录
- 增强错误处理和异常捕获机制
- 完善客户端状态管理和会话跟踪
- 优化消息处理的调试输出

提升WebSocket连接问题的诊断能力
2026-01-05 11:14:04 +08:00
moyin
6002f53cbc config:优化WebSocket远程连接的CORS配置
- 明确指定允许的域名列表,包括生产环境域名
- 添加Vite开发服务器端口支持
- 完善CORS方法和头部配置,确保WebSocket握手正常
- 支持xinghangee.icu子域名的通配符匹配

修复远程域名WebSocket连接问题的核心配置
2026-01-05 11:13:43 +08:00