1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-12-07 04:43:09 +00:00

114 Commits

Author SHA1 Message Date
Sunwuyuan
e65f84aa22
feat: 更新CORS配置,允许跨域请求携带凭证和自定义请求头 2025-12-06 13:41:40 +08:00
Sunwuyuan
ab8904b549
feat: 修复POST /:key处理,确保kvStore.upsert操作为异步执行 2025-12-06 13:10:02 +08:00
Sunwuyuan
da633ca5b6
feat: 增强POST /:key处理,支持空值和JSON格式验证 2025-12-06 13:09:00 +08:00
Sunwuyuan
1f68aea39f
Merge branch 'main' of https://github.com/ZeroCatDev/ClassworksKV 2025-12-06 11:54:58 +08:00
Sunwuyuan
b782945674
feat: 更新Socket.IO CORS设置,支持更多HTTP方法 2025-12-06 11:54:41 +08:00
Sunwuyuan
1e1b99a070
feat: 更新Socket.IO初始化配置,优化CORS设置和传输方式 2025-12-06 11:53:57 +08:00
Sunwuyuan
63716e0429 1.3.7 v1.3.7 2025-12-01 12:24:09 +00:00
Sunwuyuan
b582521fee
Merge pull request #54 from tempChanghong/main
Fix: 允许保存空数组,修复无法删除最后一条通知的Bug
2025-12-01 20:21:29 +08:00
Sunwuyuan
f985b6a11a
Update validation logic for request body
Allow empty arrays to pass validation while intercepting empty objects.
2025-12-01 20:20:17 +08:00
tempChanghong
f0de2cd59b Fix:修改语法错误 2025-12-01 16:01:20 +08:00
tempChanghong
d52ed81a29 Fix: 允许保存空数组,修复无法删除最后一条通知的Bug 2025-12-01 15:06:52 +08:00
Sunwuyuan
e73ff53f58
1.3.6 v1.3.6 2025-11-29 19:55:06 +08:00
Sunwuyuan
79ec5b94a4
feat: 添加Dlass登录 2025-11-29 19:54:50 +08:00
Sunwuyuan
ddf001b1c1
1.3.5 v1.3.5 2025-11-23 17:05:07 +08:00
Sunwuyuan
7a010faa54
1 2025-11-23 16:48:27 +08:00
Sunwuyuan
d6330c81fe
1.3.4 2025-11-16 16:15:13 +08:00
Sunwuyuan
c545612c9c
规范代码格式 2025-11-16 16:15:05 +08:00
Sunwuyuan
4ec10acfcf
feat: 增强错误处理,统一JWT过期返回格式,添加业务错误码支持 2025-11-16 16:11:31 +08:00
Sunwuyuan
398f79d5c9
1.3.3 v1.3.3 2025-11-16 14:58:09 +08:00
Sunwuyuan
4ae023afb0
feat: 添加设备信息提取功能,增强 UUID 认证中间件的错误处理 2025-11-16 14:46:05 +08:00
Sunwuyuan
4ff64ad514
1.3.2 v1.3.2 2025-11-15 20:40:07 +08:00
Sunwuyuan
a1deb5e6e3
feat: 更新设备列表接口,添加 namespace 字段;修改 token 设置名称的条件,支持家长类型 2025-11-15 20:40:00 +08:00
Sunwuyuan
78843418de
1.3.1 v1.3.1 2025-11-15 16:54:43 +08:00
Sunwuyuan
43a49b6516
1.3.0 2025-11-15 16:44:39 +08:00
Sunwuyuan
1d7078874b
feat: 添加 Prometheus 指标支持,跟踪在线设备和注册设备总数 2025-11-15 16:21:40 +08:00
Sunwuyuan
114069a999
1.2.1 v1.2.1 2025-11-09 14:36:34 +08:00
Sunwuyuan
87a408d904
feat: 更新/_info接口响应,优化设备信息返回逻辑 2025-11-09 14:32:22 +08:00
SunWuyuan
296473633c
feat: 为新设备添加默认自动登录配置 2025-11-02 11:53:55 +08:00
SunWuyuan
2ab90ffebc
feat: Implement Refresh Token system with enhanced security and user experience
- Added refresh token support in the account model with new fields: refreshToken, refreshTokenExpiry, and tokenVersion.
- Created a new token management utility (utils/tokenManager.js) for generating and verifying access and refresh tokens.
- Updated JWT utility (utils/jwt.js) to maintain backward compatibility while introducing new token generation methods.
- Enhanced middleware for JWT authentication to support new token types and automatic token refreshing.
- Expanded API endpoints in routes/accounts.js to include refresh token functionality, logout options, and token info retrieval.
- Introduced automatic token refresh mechanism in the front-end integration examples.
- Comprehensive migration checklist and documentation for the new refresh token system.
- Added database migration script to accommodate new fields in the Account table.
2025-11-02 09:48:03 +08:00
SunWuyuan
9f051885c2
1.2.0 v1.2.0 2025-11-01 20:16:33 +08:00
SunWuyuan
7d00d83dc9
1.1.2 v1.1.2 2025-11-01 20:16:06 +08:00
SunWuyuan
bb61e6e6f5
feat: Add AutoAuth functionality and enhance Apps API
- Introduced AutoAuth model to manage automatic authorization configurations for devices.
- Added new endpoint to obtain token via namespace and password for automatic authorization.
- Implemented functionality to set student names for student-type tokens.
- Enhanced AppInstall model to include deviceType and isReadOnly fields.
- Updated device creation to allow custom namespaces and ensure uniqueness.
- Added routes for managing AutoAuth configurations, including CRUD operations.
- Implemented checks for read-only tokens in KV operations.
- Created detailed API documentation for AutoAuth and new Apps API endpoints.
- Added migration scripts to accommodate new database schema changes.
2025-11-01 19:31:46 +08:00
SunWuyuan
02c0da037f
feat: integrate Socket.IO for real-time updates and online device management
- Added Socket.IO dependency to enable real-time communication.
- Initialized Socket.IO in the server and bound it to the HTTP server.
- Implemented functionality to allow clients to join device channels using KV tokens.
- Added endpoints to retrieve online devices and broadcast key changes.
- Enhanced existing routes to include device names in responses.
- Implemented broadcasting of key changes for KV operations.
- Updated documentation to reflect the new Socket.IO integration and usage.
2025-10-25 17:10:22 +08:00
SunWuyuan
b20d8dab96
1.1.1 v1.1.1 2025-10-07 20:17:22 +08:00
SunWuyuan
3c64226562
移除账户模型中的refreshToken字段,并将accessToken字段修改为可选 2025-10-07 20:17:11 +08:00
SunWuyuan
da77018509
1.1.0 v1.1.0 2025-10-07 15:08:55 +08:00
SunWuyuan
f8f63d1ddd
添加OAuth提供者和用户资料中的网站字段 2025-10-07 15:08:16 +08:00
SunWuyuan
5435814cb6
1.0.10 2025-10-07 14:49:02 +08:00
SunWuyuan
d5fc9e2dae
修改登录服务商颜色、链接地址 2025-10-07 14:48:35 +08:00
SunWuyuan
6c05d71506
添加智教联盟登录 2025-10-07 14:46:53 +08:00
SunWuyuan
be1d8d1328
1.0.9 v1.0.9 2025-10-06 16:45:21 +08:00
SunWuyuan
0576a02d6e
修复厚浪云的缩写 2025-10-06 16:45:15 +08:00
SunWuyuan
d83d748da0
添加厚浪云(Logto)作为OAuth提供者 2025-10-06 16:41:23 +08:00
SunWuyuan
6ab78af370
更新授权页面地址为环境变量FRONTEND_URL 2025-10-06 15:49:29 +08:00
SunWuyuan
9f4f2a537f
1.0.8 v1.0.8 2025-10-06 13:39:18 +08:00
SunWuyuan
24c443bb89
Merge branch 'main' of https://github.com/ZeroCatDev/ClassworksKV 2025-10-06 11:11:17 +08:00
SunWuyuan
0fca7900c8
cskv 2025-10-06 11:10:54 +08:00
SunWuyuan
aec482cbcb
cskv 2025-10-06 10:49:48 +08:00
SunWuyuan
7b1e224f70
继续一大堆功能实现 2025-10-03 21:22:18 +08:00
SunWuyuan
521522c1d2
更新到一半 2025-10-02 12:07:50 +08:00