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 2019/12/06 09:32:08 UTC

[GitHub] [incubator-apisix] simplechen commented on issue #941: bug: key-auth使用报错

simplechen commented on issue #941: bug: key-auth使用报错
URL: https://github.com/apache/incubator-apisix/issues/941#issuecomment-562500747
 
 
   > If the api-key is `123456`, the `consumer` should be:
   > 
   > ```
   > -- create new consumer
   > {
   >     "username": "jack",
   >     "plugins": {
   >         "key-auth": {
   >             "key": "123456"     
   >         }
   >     }
   > }
   > ```
   > 
   > ```
   > -- enable consumer in route
   > {
   >     "uris": [
   >         "/hello"
   >     ],
   >     "upstream_id": "00000000000000000020",
   >     "desc": "flask hello",
   >     "plugins": {
   >         "key-auth": {}
   >     }
   > }
   > ```
   > 
   > make a test:
   > 
   > ```
   > curl http://10.0.10.226:9080/hello -H 'apikey: 123456' -i
   > ```
   
   是我上面贴的问题,现实中我配置的就是123456。刚刚我修复了主题上面的配置

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services