SHARE
TWEET

Kong Key Auth Plugin

irobust Apr 23rd, 2019 (edited) 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top