Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct {
RefreshToken
}
type ClaimsUser ¶ added in v1.17.7
type LoginRedis ¶
type LoginToken ¶
type LoginToken struct { UserClaims ID uint64 `json:"id"` }
type MfaRedis ¶
type MfaRedis struct { LoginRedis Mfa string `json:"mfa"` AppCallback string `json:"appCallback"` }
type MfaToken ¶
type MfaToken struct { UserClaims ID uint64 `json:"id"` }
type RefreshToken ¶
type RefreshToken struct { UserClaims ID uint64 `json:"id"` AppCode string `json:"appCode"` Payload string `json:"payload,omitempty"` }
type TypedClaims ¶
type TypedClaims struct { jwt.RegisteredClaims Type string `json:"type"` }
TypedClaims type 字段用于区分不同类型的 token,防止类型窜用导致的安全漏洞
func (TypedClaims) GetType ¶
func (c TypedClaims) GetType() string
type U2fToken ¶
type U2fToken struct { UserClaims ID uint64 `json:"id"` IP string `json:"ip"` }
type UserClaims ¶ added in v1.17.7
type UserClaims struct { TypedClaims // 用户 ID UID uint `json:"uid"` UserOperateID uint64 `json:"oid"` }
func (UserClaims) GetUID ¶ added in v1.17.7
func (u UserClaims) GetUID() uint
func (UserClaims) GetUserOperateID ¶ added in v1.17.7
func (u UserClaims) GetUserOperateID() uint64
Click to show internal directories.
Click to hide internal directories.