diff --git a/apisix/plugins/multi-auth.lua b/apisix/plugins/multi-auth.lua index 82e6e594ac130..e9a7b6b7c2fe1 100644 --- a/apisix/plugins/multi-auth.lua +++ b/apisix/plugins/multi-auth.lua @@ -15,16 +15,14 @@ -- limitations under the License. -- local core = require("apisix.core") +local require = require +local pairs = pairs local schema = { type = "object", title = "work with route or service object", properties = { - auth_plugins = { type = "array", minItems = 2 }, - hide_credentials = { - type = "boolean", - default = false, - } + auth_plugins = { type = "array", minItems = 2 } }, required = { "auth_plugins" }, } diff --git a/docs/en/latest/plugins/multi-auth.md b/docs/en/latest/plugins/multi-auth.md index 1dd84c43d2af5..7ac2181988358 100644 --- a/docs/en/latest/plugins/multi-auth.md +++ b/docs/en/latest/plugins/multi-auth.md @@ -36,9 +36,9 @@ The `multi-auth` Plugin is used to add multiple authentication methods to a Rout For Route: -| Name | Type | Required | Default | Description | -|-------------|-------|----------|---------|-----------------------------------------------------------------------------------------| -| auth_plugin | array | True | - | Add supporting auth plugin configuration. | +| Name | Type | Required | Default | Description | +|--------------|-------|----------|---------|--------------------------------------------| +| auth_plugins | array | True | - | Add supporting auth plugins configuration. | ## Enable Plugin diff --git a/t/plugin/multi-auth.t b/t/plugin/multi-auth.t index 72360f5d1bc1e..b128d3f4142e7 100644 --- a/t/plugin/multi-auth.t +++ b/t/plugin/multi-auth.t @@ -199,8 +199,8 @@ apikey: auth-two --- request GET /t --- error_code: 400 ---- response_body -{"error_msg":"failed to check the configuration of plugin multi-auth err: property \"auth_plugins\" is required"} +--- response_body_like eval +qr/\{"error_msg":"failed to check the configuration of plugin multi-auth err: property \\"auth_plugins\\" is required"\}/ @@ -240,5 +240,5 @@ GET /t --- request GET /t --- error_code: 400 ---- response_body -{"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"} +--- response_body_like eval +qr/\{"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"\}/