JohnnyQianP opened a new issue, #6936:
URL: https://github.com/apache/apisix/issues/6936

   ### Description
   
   
![image](https://user-images.githubusercontent.com/14548092/165303756-21b8edb5-21ac-4ca3-8fc3-064c8049b1c8.png)
   Port 32253 is the apisix-admin service
   ```
   # curl -X PUT 'http://192.168.126.100:32253/apisix/admin/routes/r1' \
   >  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   >  -d '{
   >  "uri":"/apisix/plugin/jwt/sign",
   >  "plugins":{
   >  "public-api": {}
   >  }
   >  }'
   <html>
   <head><title>403 Forbidden</title></head>
   <body>
   <center><h1>403 Forbidden</h1></center>
   <hr><center>openresty</center>
   </body>
   </html>
   
   ```
   ```
   # curl http://192.168.126.100:32253/apisix/plugin/jwt/sign?key=genpack-key -i
   HTTP/1.1 404 Not Found
   Server: openresty
   Date: Tue, 26 Apr 2022 12:11:21 GMT
   Content-Type: text/html; charset=utf-8
   Content-Length: 150
   Connection: keep-alive
   ```
   when i execute the put script in container:
   ```
   /usr/local/apisix # curl -X PUT 
'http://127.0.0.1:9180/apisix/admin/routes/r1' \
   >  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   >  -H 'Content-Type: application/json' \
   >  -d '{
   >  "uri":"/apisix/plugin/jwt/sign",
   >  "plugins":{
   >  "public-api": {}
   >  }
   >  }'
   {"error_msg":"unknown plugin [public-api]"}
   ```
   If donot use public-api plugin, how can I use jwt-auth plugin to 
authenticate?
   
![image](https://user-images.githubusercontent.com/14548092/165304866-f88ec07c-bd88-4b9f-9b40-e2ec7a6baf5c.png)
   
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.13.1
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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