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