Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Add Key Auth plugin
- curl -X POST http://localhost:8001/plugins
- --data="name=key-auth"
- 2. Add consumers
- curl -X POST http://localhost:8001/consumers
- --data="username=john"
- 3. Generate Key
- curl -X POST http://localhost:8001/consumers/john/key-auth
- 4. Get generated key
- curl -X GET http://localhost:8001/consumers/john/key-auth
- 5. Add apiKey header
- curl -X GET http://locahost:8000/api/v1/products --header="apiKey=<Get API KEY from previous step>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement