Enable JWT auth plugin

Enable JWT authentication on a route via plugin config

# Add jwt-auth to plugins in route or consumer config

tool
apisix16 commands
tags
apisixapi-gatewayjwtauth

More apisix commands

  • curl http://apisix-admin:9180/apisix/admin/plugins/list -H "X-API-KEY: $ADMIN_KEY"

    List all available APISIX plugins

  • apisix reload

    Hot-reload APISIX configuration without downtime

  • curl -X PATCH http://apisix-admin:9180/apisix/admin/routes/1 \ -H "X-API-KEY: $ADMIN_KEY" \ -d '{"plugins":{"jwt-auth":{"header":"Authorization","query":"jwt"}}}'

    Add jwt-auth plugin to an existing route via Admin API

  • curl -s http://apisix:9180/apisix/admin/routes -H 'X-API-KEY: <key>' | jq '.list[].value | {id:.id, uri:.uri, upstream:.upstream.nodes}'

    List all APISIX routes with URI and upstream

  • curl -s http://apisix:9180/apisix/admin/routes/<id> -H 'X-API-KEY: <key>' | jq .

    Inspect a single APISIX route configuration

all 16 apisix commands