🔒 token encryption

This commit is contained in:
landaiqing
2024-08-14 19:57:37 +08:00
parent 368adadf52
commit 55759a33db
19 changed files with 241 additions and 39 deletions

View File

@@ -21,7 +21,7 @@ func JWTAuthMiddleware() gin.HandlerFunc {
headerPrefix := global.CONFIG.JWT.HeaderPrefix
accessToken := strings.TrimPrefix(authHeader, headerPrefix+" ")
if accessToken == "undefined" || accessToken == "" {
if accessToken == "" {
c.Abort()
result.FailWithMessage(ginI18n.MustGetMessage(c, "AuthVerifyFailed"), c)
return