Skip to content

Commit

Permalink
fix code checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhawa Gunasekara authored and Madhawa Gunasekara committed Nov 12, 2023
1 parent 6a1e80a commit 484061e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apisix/plugins/multi-auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _M.rewrite(conf, ctx)
for k, auth_plugin in pairs(auth_plugins) do
for key, value in pairs(auth_plugin) do
local auth = require("apisix.plugins." .. key)
local auth_code, b = auth.rewrite(value, ctx)
local auth_code = auth.rewrite(value, ctx)
status_code = auth_code
if auth_code == nil then
core.log.debug("Authentication is successful" .. key .. " plugin")
Expand Down
8 changes: 4 additions & 4 deletions t/plugin/multi-auth.t
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ GET /hello
Authorization: Basic YmFyOmJhcgo=
--- error_code: 401
--- response_body
{"message":"Authorization Failed."}
{"message":"Authorization Failed"}



Expand All @@ -165,7 +165,7 @@ GET /hello
apikey: auth-two
--- error_code: 401
--- response_body
{"message":"Authorization Failed."}
{"message":"Authorization Failed"}



Expand Down Expand Up @@ -200,7 +200,7 @@ apikey: auth-two
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid plugins configuration: failed to check the configuration of plugin multi-auth err: property \"auth_plugins\" is required"}
{"error_msg":"failed to check the configuration of plugin multi-auth err: property \"auth_plugins\" is required"}



Expand Down Expand Up @@ -241,4 +241,4 @@ GET /t
GET /t
--- error_code: 400
--- response_body
{"error_msg":"invalid plugins configuration: failed to check the configuration of plugin multi-auth err: property \"auth_plugins\" validation failed: expect array to have at least 2 items"}
{"error_msg":"failed to check the configuration of plugin multi-auth err: property \"auth_plugins\" validation failed: expect array to have at least 2 items"}

0 comments on commit 484061e

Please sign in to comment.