1
This commit is contained in:
parent
5dc2af5cf6
commit
df6798dad1
@ -32,11 +32,6 @@ func JwtAuth(c *gin.Context) {
|
||||
jsonRspObj := &struct {
|
||||
ErrCode interface{} `json:"errcode"`
|
||||
ErrMsg string `json:"errmsg"`
|
||||
}{
|
||||
}
|
||||
rspObj := &struct {
|
||||
ErrCode interface{} `json:"errcode"`
|
||||
ErrMsg string `json:"errmsg"`
|
||||
Decoded struct {
|
||||
Sub string `json:"sub"`
|
||||
Email string `json:"email"`
|
||||
@ -44,6 +39,10 @@ func JwtAuth(c *gin.Context) {
|
||||
Sid string `json:"sid"`
|
||||
} `json:"decoded"`
|
||||
}{}
|
||||
rspObj := &struct {
|
||||
ErrCode interface{} `json:"errcode"`
|
||||
ErrMsg string `json:"errmsg"`
|
||||
}{}
|
||||
paramsStr := q5.EncodeJson(jsonReqObj)
|
||||
url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Web3ServiceCluster.RandElement().GetUrl())
|
||||
f5.GetHttpCliMgr().SendGoStyleJsonRspPost(
|
||||
@ -63,6 +62,7 @@ func JwtAuth(c *gin.Context) {
|
||||
}
|
||||
rspObj.ErrCode = q5.SafeToInt32(jsonRspObj.ErrCode)
|
||||
rspObj.ErrMsg = jsonRspObj.ErrMsg
|
||||
c.Set("open_id", jsonRspObj.Decoded.Sub)
|
||||
c.Next()
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user