Browse Source

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

main
SliverHorn 4 years ago
parent
commit
95d49ab565
  1. 1
      server/middleware/jwt.go

1
server/middleware/jwt.go

@ -42,6 +42,7 @@ func JWTAuth() gin.HandlerFunc {
return
}
if err, _ = service.FindUserByUuid(claims.UUID.String()); err != nil {
_ = service.JsonInBlacklist(model.JwtBlacklist{Jwt: token})
response.FailWithDetailed(gin.H{"reload": true}, err.Error(), c)
c.Abort()
}

Loading…
Cancel
Save