From 25ee6dcf54da2c3b62a46f86d517d338c473666c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 4 Nov 2024 15:28:12 +0800 Subject: [PATCH] 1 --- server/wheelserver/middleware/jwtauth.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/server/wheelserver/middleware/jwtauth.go b/server/wheelserver/middleware/jwtauth.go index b2e248cc..7733f718 100644 --- a/server/wheelserver/middleware/jwtauth.go +++ b/server/wheelserver/middleware/jwtauth.go @@ -6,7 +6,6 @@ import ( "jccommon" "main/mt" "q5" - "strings" . "main/global" @@ -55,10 +54,14 @@ func internalMetaMaskJwtAuth(c *gin.Context, jwtToken string) { ErrMsg string `json:"errmsg"` Decoded struct { Id string `json:"id"` + Uid string `json:"uid"` + Gid string `json:"gid"` OpenId string `json:"openid"` - Plat int32 `json:"plat"` Version int32 `json:"version"` - Email string `json:"email"` + Plat int32 `json:"plat"` + PlatVip int32 `json:"platVip"` + Invited string `json:"invited"` + NickName string `json:"nickname"` } `json:"decoded"` }{} rspObj := &struct { @@ -99,12 +102,6 @@ func internalMetaMaskJwtAuth(c *gin.Context, jwtToken string) { f5.GetSysLog().Info("not support this platform:%s", rsp.GetRawData()) return } - openId := fmt.Sprintf("%d_2006_%s", - jccommon.BC_CHANNEL, - strings.ToLower(jsonRspObj.Decoded.OpenId)) - c.Set("open_id", openId) - c.Set("account_address", strings.ToLower(jsonRspObj.Decoded.OpenId)) - c.Set("email", strings.ToLower(jsonRspObj.Decoded.Email)) c.Next() }) }