refactor: 移除 Session 架构下已无用的 TokenVersion 即时吊销机制
- 删除 UserRepo.IncrementTokenVersion/FindTokenVersion 方法 - 从 userAuthStore/userAdminStore 接口移除 IncrementTokenVersion - 删除 middleware.tokenVersionStore 接口(中间件不再查询 token_version) - auth_service: DeleteAccount/InvalidateSessions 仅调用 DestroyByUID - admin_service: UpdateUserStatus/ResetUserToken 仅调用 DestroyByUID - FindByIDForAuth/FindByIDUnscoped Select 移除 token_version 列 - 新架构下登出/改密/封禁统一走 sessionManager.DestroyByUID,无需 token_version
This commit is contained in:
@ -1,7 +1,3 @@
|
||||
package middleware
|
||||
|
||||
// tokenVersionStore 最小接口:AuthMiddleware 不再需要此接口(session 替换 JWT)
|
||||
// 保留占位,待后续清理
|
||||
type tokenVersionStore interface {
|
||||
FindTokenVersion(userID uint) (int, error)
|
||||
}
|
||||
// repository.go: JWT tokenVersionStore 接口已随 Session 迁移移除,保留占位,后续清理。
|
||||
|
||||
Reference in New Issue
Block a user