Table of Contents
1. Configure the Basic Auth Plugin for your API
Issue the following cURL request on the previously created API named
$ curl -i -X POST \
--url http://localhost:8001/apis/example-api/plugins/ \
Or, add your first plugin via Kong Manager on the “Plugins” page:
2. Verify that the Plugin is Properly Configured
Issue the following cURL request to verify that the [basic-auth][basic-auth]
plugin was properly configured on the API:
$ curl -i -X GET \
--url http://localhost:8000/ \
--header 'Host: example.com'
Since you did not specify the required header or parameter, the response should
HTTP/1.1 401 Unauthorized
"message": "No API key found in request"