提交 95d49ab5 编写于 作者: m0_50812349's avatar m0_50812349

当用户不存在时,拉黑前端的token

上级 0c0cdaff
...@@ -42,6 +42,7 @@ func JWTAuth() gin.HandlerFunc { ...@@ -42,6 +42,7 @@ func JWTAuth() gin.HandlerFunc {
return return
} }
if err, _ = service.FindUserByUuid(claims.UUID.String()); err != nil { if err, _ = service.FindUserByUuid(claims.UUID.String()); err != nil {
_ = service.JsonInBlacklist(model.JwtBlacklist{Jwt: token})
response.FailWithDetailed(gin.H{"reload": true}, err.Error(), c) response.FailWithDetailed(gin.H{"reload": true}, err.Error(), c)
c.Abort() c.Abort()
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册