feat(key-auth): supporting key-auth plugin to get key from query string#4490
Conversation
|
@wisdom-yzh From the changes I guess you tried to introduce an using order between the |
|
@tokers Accord to description of #4421, I guess @forgaoqiang wants to get key from both query string and headers, not exclusive. Maybe I can define one field instead of two fields, and check key from both query and headers? |
|
I think "header and query string" is OK, as jwt-auth plugin does it: apisix/apisix/plugins/jwt-auth.lua Line 154 in 07bfe5b |
|
|
||
|
|
||
| === TEST 11: valid consumer | ||
| === TEST 11: customize querystring |
There was a problem hiding this comment.
Please don't add the test in the middle of the other test. And we need to verify it via GET /hello?xxx in its own version of "valid consumer"
|
@spacewander hi~I have changed strategy to "header and query string", and then rename field from "header" to "key_name“. |
|
@wisdom-yzh |
ok, i'll restore the origin commit and fix the test case issue soon |
|
Great, this feature is what I needed, thanks |
What this PR does / why we need it:
fixes issue #4421
Adding a new
queryproperty to key-auth plugin, which can get key value from http query stringPre-submission checklist: