重置密码
This commit is contained in:
@@ -8,7 +8,8 @@ import (
|
||||
type OperateType int8
|
||||
|
||||
const (
|
||||
OpTypeRegister OperateType = 1 //注册的操作类型
|
||||
OpTypeRegister OperateType = 1 //注册的操作类型
|
||||
OpTypeResetToken OperateType = 2 //重置密码类型
|
||||
)
|
||||
|
||||
type ConfirmationLink[T any] struct {
|
||||
|
||||
@@ -14,15 +14,24 @@ import (
|
||||
|
||||
type RegisterToken struct {
|
||||
OperateType // 操作的类型, 验证的token 必须要继承这个
|
||||
Id int64 // 注册的 id
|
||||
Id int64 // 注册的 id google_id 或 facebook_id ...
|
||||
GuestId uint64 // guest_id 需要继承
|
||||
WId string // websocket 通道id
|
||||
Wid string // websocket 通道id
|
||||
Email string // email
|
||||
Password string // 密码
|
||||
Platform string // 平台
|
||||
CreateAt time.Time // 创建时间
|
||||
}
|
||||
|
||||
type ResetToken struct {
|
||||
OperateType // 操作的类型, 验证的token 必须要继承这个
|
||||
UserId uint64 // guest_id 需要继承
|
||||
Wid string // websocket 通道id
|
||||
Email string // email
|
||||
Password string // 密码
|
||||
CreateAt time.Time // 创建时间
|
||||
}
|
||||
|
||||
func ParseJwtTokenUint64SecretByRequest(r *http.Request, AccessSecret uint64) (jwt.MapClaims, error) {
|
||||
AuthKey := r.Header.Get("Authorization")
|
||||
if AuthKey == "" {
|
||||
|
||||
Reference in New Issue
Block a user