1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-12-07 21:13:10 +00:00

19 Commits

Author SHA1 Message Date
Sunwuyuan
1d7078874b
feat: 添加 Prometheus 指标支持,跟踪在线设备和注册设备总数 2025-11-15 16:21:40 +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
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
7b1e224f70
继续一大堆功能实现 2025-10-03 21:22:18 +08:00
SunWuyuan
521522c1d2
更新到一半 2025-10-02 12:07:50 +08:00
SunWuyuan
35d05df925
Refactor project structure by reorganizing imports, removing unused files, and updating .gitignore to include additional environment and build directories. Delete legacy migration scripts and Docker configurations to streamline the codebase. 2025-05-25 09:25:58 +08:00
SunWuyuan
810491fd2f
Enable static file serving in app.js, implement a batch import endpoint in kv.js for bulk key-value pair uploads, and add a corresponding rate limiter. Enhance the front-end in index.ejs with a form for batch data import and improve styling for better user experience. 2025-05-11 12:04:06 +08:00
SunWuyuan
4a8b19c0b8
Enhance CORS configuration in app.js to support path-based options and set max age for preflight requests. Update dependencies in package.json and pnpm-lock.yaml to latest versions, including express, body-parser, http-errors, and morgan. 2025-05-11 11:35:08 +08:00
SunWuyuan
6897a082e7
Integrate OpenTelemetry instrumentation into app.js, add global and method-based rate limiting middleware, and enhance CORS configuration. Update package.json to include new dependencies for OpenTelemetry and rate limiting tests. 2025-05-11 11:30:26 +08:00
SunWuyuan
fc066a88ff
Add /check endpoint to app.js for API status verification 2025-05-10 21:53:16 +08:00
SunWuyuan
28f6a6bc80
Update app.js to use fileURLToPath for directory resolution and comment out unused imports. Modify Docker image reference in workflow configuration for deployment consistency. 2025-05-10 15:04:17 +08:00
SunWuyuan
4c8e38e805
Refactor app.js to streamline routing by removing unused API endpoints and integrating the KV store router directly. Clean up errorHandler.js by removing unnecessary comments and imports. 2025-05-10 13:50:19 +08:00
SunWuyuan
eeacc317a9
app.js 重构为 ES 模块,新增 KV 存储功能,并实现请求超时中间件。更新 package.json 中的依赖项并移除未使用的路由。完善 README,补充项目特性与安装使用说明。 2025-05-10 13:47:02 +08:00
SunWuyuan
c526478bec
1 2025-03-16 16:21:23 +08:00
SunWuyuan
7ba9963a6c
1 2025-03-16 10:10:35 +08:00
SunWuyuan
f0f9568eb6
1 2025-02-23 14:36:22 +08:00
1a03634abf 1 2024-11-24 16:52:52 +08:00
2558c2aa12 1 2024-11-24 09:20:41 +08:00
8ad86c103f first 2024-11-17 16:16:16 +08:00