This commit is contained in:
eson
2023-08-29 14:19:47 +08:00
parent 79b6277332
commit 3103d69bae
8 changed files with 136 additions and 39 deletions

View File

@@ -3,6 +3,7 @@ package auth
import (
"crypto/sha256"
"encoding/binary"
"encoding/gob"
"errors"
"fmt"
"net/http"
@@ -12,16 +13,20 @@ import (
"github.com/golang-jwt/jwt"
)
func init() {
gob.Register(map[string]interface{}{})
}
type RegisterToken struct {
OperateType // 操作的类型, 验证的token 必须要继承这个
Id int64 // 注册的 id google_id 或 facebook_id ...
GuestId int64 // guest_id 需要继承
Wid string // websocket 通道id
Email string // email
Password string // 密码
Platform string // 平台
TraceId string //链路Id
CreateAt time.Time // 创建时间
OperateType // 操作的类型, 验证的token 必须要继承这个
GuestId int64 // guest_id 需要继承
Wid string // websocket 通道id
Email string // email
Password string // 密码
Platform string // 平台
TraceId string // 链路Id
CreateAt time.Time // 创建时间
Extend map[string]interface{} // 扩展信息 Id int64 // 注册的 id google_id 或 facebook_id ...
}
type ResetToken struct {