You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/01 14:45:57 UTC
[GitHub] [apisix] wisdom-yzh commented on a change in pull request #4490: feat(key-auth): supporting key-auth plugin to get key from query string
wisdom-yzh commented on a change in pull request #4490:
URL: https://github.com/apache/apisix/pull/4490#discussion_r662355235
##########
File path: t/plugin/key-auth.t
##########
@@ -309,3 +309,51 @@ Authorization: auth-one
hello world
--- no_error_log
[error]
+
+
+
+=== TEST 12: customize query string
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "key-auth": {
+ "query": "auth"
+ }
+ },
+ "upstream": {
+ "nodes": {
+ "127.0.0.1:1980": 1
+ },
+ "type": "roundrobin"
+ },
+ "uri": "/hello"
+ }]]
+ )
+
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+ }
+ }
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST13: valid consumer
Review comment:
ok resolved
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org