bin-53 commented on issue #9893:
URL: https://github.com/apache/apisix/issues/9893#issuecomment-1649427140

   > @bin-53 I see the error is coming from wrongly configured jwt-auth plugin 
but your configuration doesn't show the jwt-auth config. Can you share all the 
other routes config as well? Especially for `/login` where the request was 
redirected
   
   
   
   > Can you provide reproduction steps? thx
   
   thank your reply firstly~,you can see:
   1.set the route cfg:
   ```
   {
       "id": "470105498213941950",
       "create_time": 1689734312,
       "update_time": 1690275844,
       "uri": "/apisixtest/*",
       "name": "apisix_test",
       "priority": 1,
       "methods": [
           "PUT",
           "DELETE",
           "PATCH",
           "HEAD",
           "OPTIONS",
           "GET",
           "POST"
       ],
       "plugins": {
           "basic-auth": {
               "disable": false
           },
           "proxy-rewrite": {
               "regex_uri": [
                   "^/apisixtest(/|$)(.*)",
                   "/$2"
               ]
           }
       },
       "upstream": {
           "nodes": [
               {
                   "host": "192.168.88.66",
                   "port": 9081,
                   "weight": 1
               }
           ],
           "retries": 2,
           "timeout": {
               "connect": 6,
               "send": 6,
               "read": 6
           },
           "type": "roundrobin",
           "scheme": "http",
           "pass_host": "pass",
           "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
           },
           "retry_timeout": 2
       },
       "status": 1
   }
   ```
   2. set the consumer cfg:
   ```
   {
       "username": "ces",
       "desc": "c二十111",
       "plugins": {
           "basic-auth": {
               "disable": false,
               "password": "yc",
               "username": "yc"
           },
           "ip-restriction": {
               "blacklist": [
                   "192.168.88.66",
                   "192.168.88.61"
               ],
               "disable": false,
               "message": "黑名单"
           },
           "jwt-auth": {
               "algorithm": "HS512",
               "base64_secret": true,
               "disable": false,
               "exp": 100,
               "key": "yc",
               "secret": "yc"
           },
           "key-auth": {
               "disable": false,
               "key": "yc"
           }
       },
       "create_time": 1689745177,
       "update_time": 1690275902,
       "consumerNameStr": "basic-auth,ip-restriction,jwt-auth,key-auth"
   }
   ```
   3.request the url:
   
![image](https://github.com/apache/apisix/assets/131146587/c890016b-a133-4cca-ae51-20571b29ff63)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to