超级token
This commit is contained in:
parent
a6954f8f9e
commit
0ebc447c32
18
main.go
18
main.go
|
|
@ -137,15 +137,15 @@ func JWTAuthMiddleware() gin.HandlerFunc {
|
||||||
//查看token是否在超级token中
|
//查看token是否在超级token中
|
||||||
if worker.IsContainSet("super_permission_tokens", tokenString) {
|
if worker.IsContainSet("super_permission_tokens", tokenString) {
|
||||||
sId := c.Request.Header.Get("super_id")
|
sId := c.Request.Header.Get("super_id")
|
||||||
if sId == "" {
|
//if sId == "" {
|
||||||
c.AbortWithStatus(200)
|
// c.AbortWithStatus(200)
|
||||||
c.JSON(200, gin.H{
|
// c.JSON(200, gin.H{
|
||||||
"message": "NOT_LOGIN",
|
// "message": "NOT_LOGIN",
|
||||||
"error": "super_id is empty",
|
// "error": "super_id is empty",
|
||||||
"code": proto.TokenIsNull,
|
// "code": proto.TokenIsNull,
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
if sId == "" {
|
if sId == "" {
|
||||||
sId = c.Query("super_id")
|
sId = c.Query("super_id")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue