Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Nov 22, 2024
1 parent 96bb0e7 commit 7b67ba2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apisix/plugins/hmac-auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ function _M.rewrite(conf, ctx)
return 401, err
end
core.log.warn(err)
return 401, {message = "client request can't be validated: " .. err}
return 401, {message = err}
end

if conf.hide_credentials then
Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/jwt-auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ function _M.rewrite(conf, ctx)
local jwt_obj = jwt:load_jwt(jwt_token)
core.log.info("jwt object: ", core.json.delay_encode(jwt_obj))
if not jwt_obj.valid then
err = "JWT token invalid: " .. jwt_obj.reason
if auth_utils.is_running_under_multi_auth(ctx) then
err = "JWT token invalid: " .. jwt_obj.reason
return 401, err
end
core.log.warn(err)
Expand Down

0 comments on commit 7b67ba2

Please sign in to comment.