authz-casdoor

IMPORTANT

endpoint_addr and callback_url should not end with ‘/‘.

authz-casdoor - 图2IMPORTANT

You can enable the Plugin on a specific Route as shown below:

After successfully logging in, Casdoor will redirect this user to the callback_url with GET parameters code and specified. The Plugin will also request for an access token and confirm whether the user is really logged in. This process is only done once and subsequent requests are left uninterrupted.

To disable the authz-casdoor Plugin, you can delete the corresponding JSON configuration from the Plugin configuration. APISIX will automatically reload and you do not have to restart for this to take effect.

  1. curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
  2. {
  3. "methods": ["GET"],
  4. "uri": "/anything/*",
  5. "type": "roundrobin",
  6. "nodes": {
  7. "httpbin.org:80": 1
  8. }
  9. }'