This commit is contained in:
eson
2023-07-27 16:48:43 +08:00
parent abc315a39b
commit 0ce35645b2
10 changed files with 195 additions and 112 deletions

View File

@@ -10,6 +10,12 @@ import (
"net/url"
)
type OperateType int8
const (
OpTypeRegister OperateType = 1 //注册的操作类型
)
type ConfirmationLink[T any] struct {
Secret []byte
DefaultQueryKey string // 默认key 是 token

View File

@@ -13,10 +13,14 @@ import (
)
type RegisterToken struct {
Id int64
Password string
Platform string
Expired time.Time
OperateType // 操作的类型, 验证的token 必须要继承这个
Id int64 // 注册的 id
GuestId uint64 // guest_id 需要继承
WCId uint64 // websocket 通道id
Email string // email
Password string // 密码
Platform string // 平台
CreateAt time.Time // 创建时间
}
func ParseJwtTokenUint64SecretByRequest(r *http.Request, AccessSecret uint64) (jwt.MapClaims, error) {