更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -2,16 +2,13 @@ package models
|
||||
|
||||
import "time"
|
||||
|
||||
// 会话吊销原因
|
||||
const (
|
||||
RevokeReasonLogout = "logout" // 用户主动登出
|
||||
RevokeReasonKicked = "kicked" // 被新登录踢下线(1号1机)
|
||||
RevokeReasonAdmin = "admin" // 管理员强制下线
|
||||
RevokeReasonExpired = "expired" // 过期清理
|
||||
RevokeReasonLogout = "logout"
|
||||
RevokeReasonKicked = "kicked"
|
||||
RevokeReasonAdmin = "admin"
|
||||
RevokeReasonExpired = "expired"
|
||||
)
|
||||
|
||||
// AuthSession 登录会话:yz_auth_session
|
||||
// 用于「1号1机」并发控制、在线设备列表、强制下线。
|
||||
type AuthSession struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Sid string `orm:"column(sid);size(64)" json:"sid"`
|
||||
@@ -36,8 +33,6 @@ func (m *AuthSession) TableName() string {
|
||||
return "yz_auth_session"
|
||||
}
|
||||
|
||||
// AuthRefreshToken 刷新令牌:yz_auth_refresh_token
|
||||
// 明文仅在颁发时返回一次,库中只存哈希;轮换时通过 family_id 检测重放。
|
||||
type AuthRefreshToken struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TokenHash string `orm:"column(token_hash);size(128)" json:"token_hash"`
|
||||
@@ -57,8 +52,6 @@ func (m *AuthRefreshToken) TableName() string {
|
||||
return "yz_auth_refresh_token"
|
||||
}
|
||||
|
||||
// AuthCode 授权码:yz_auth_code
|
||||
// 一次性、60 秒有效,配合 PKCE(S256)使用。
|
||||
type AuthCode struct {
|
||||
CodeHash string `orm:"column(code_hash);size(128);pk" json:"code_hash"`
|
||||
ClientID string `orm:"column(client_id);size(64)" json:"client_id"`
|
||||
@@ -78,8 +71,6 @@ func (m *AuthCode) TableName() string {
|
||||
return "yz_auth_code"
|
||||
}
|
||||
|
||||
// AuthTokenBlacklist 令牌吊销表:yz_auth_token_blacklist
|
||||
// 记录已登出/被踢下线的 access token 的 jti,过期后可定期清理。
|
||||
type AuthTokenBlacklist struct {
|
||||
Jti string `orm:"column(jti);size(64);pk" json:"jti"`
|
||||
IdentityID uint64 `orm:"column(identity_id);default(0)" json:"identity_id"`
|
||||
|
||||
Reference in new issue
Block a user