Advertisement
irobust

Kong Key Auth Plugin

Apr 23rd, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. 1. Add Key Auth plugin
  2. curl -X POST http://localhost:8001/plugins
  3. --data="name=key-auth"
  4.  
  5. 2. Add consumers
  6. curl -X POST http://localhost:8001/consumers
  7. --data="username=john"
  8.  
  9. 3. Generate Key
  10. curl -X POST http://localhost:8001/consumers/john/key-auth
  11.  
  12. 4. Get generated key
  13. curl -X GET http://localhost:8001/consumers/john/key-auth
  14.  
  15. 5. Add apiKey header
  16. 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