refactor: 更新认证方式为密码验证
简化认证流程,移除用户名,只需要输入访问密码: ## 后端更改 - 移除 JWT_SECRET、ADMIN_USERNAME、ADMIN_PASSWORD 配置 - 添加 ACCESS_PASSWORD 配置 - 更新认证接口:POST /api/auth/verify-password - 简化 JWT payload,只包含认证状态和时间戳 - 移除用户管理相关代码 - 更新认证中间件 ## 前端更改 - 登录页面只显示密码输入框 - 移除用户名输入和相关状态 - 更新 Pinia store 为 verifyPassword 方法 - 移除 User 类型定义 - 更新布局和设置页面 ## 文档更改 - 更新 README.md 说明新的认证方式 - 更新 DEVELOPMENT_GUIDE.md 环境变量配置 - 更新 API.md 认证接口文档 - 更新 .env.example 配置模板 ## 安全改进 - 使用 ACCESS_PASSWORD 作为 JWT 签名密钥 - 自动清理过期会话(7天) - 简化配置,更易于部署 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ed626e74dc
commit
903dc1e61f
15 files changed
+124
-171
No files matched your search
@@ -3,7 +3,11 @@
|
||||
"allow": [
|
||||
"Bash(npm install:*)",
|
||||
"Bash(git init:*)",
|
||||
"Bash(git add:*)"
|
||||
"Bash(git add:*)",
|
||||
"Bash(git commit:*)",
|
||||
"Bash(git remote add:*)",
|
||||
"Bash(git branch:*)",
|
||||
"Bash(git push:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user