chore: 清理 JWT 向后兼容残留,移除全部死代码
- 删除 5 个空壳占位文件:auth_token.go/auth_parser.go/repository.go(middleware)/token_service.go/provider.go - 移除 Config.JWT 字段、JWTConfig 结构体、JWT_SECRET 环境变量绑定 - 移除 config.yaml 中的 jwt 配置段 - 移除 model.User.TokenVersion 字段(session DestroyByUID 替代) - 移除 service/repository.go 中已废弃的 userTokenStore 接口
This commit is contained in:
@ -12,9 +12,8 @@ type User struct {
|
||||
Avatar string `gorm:"type:varchar(500);default:''" json:"avatar"`
|
||||
Bio string `gorm:"type:text" json:"bio"`
|
||||
|
||||
Role string `gorm:"type:varchar(20);default:user;index;not null" json:"role"`
|
||||
Status string `gorm:"type:varchar(20);default:active;index;not null" json:"status"`
|
||||
TokenVersion int `gorm:"default:0;not null" json:"-"` // 令牌版本,+1 即时吊销所有 JWT
|
||||
Role string `gorm:"type:varchar(20);default:user;index;not null" json:"role"`
|
||||
Status string `gorm:"type:varchar(20);default:active;index;not null" json:"status"`
|
||||
|
||||
// 安全与审计
|
||||
RegIP string `gorm:"type:varchar(45);default:''" json:"-"` // 注册 IP
|
||||
|
||||
Reference in New Issue
Block a user