Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Add JWT plugin
- curl -X POST http://localhost:8001/plugins
- --data="name=jwt"
- 2. Add consumers
- curl -X POST http://localhost:8001/consumers
- --data="custom_id=abc1234"
- 3. Generate Key
- curl -X POST http://localhost:8001/consumers/abc1234/jwt
- 4. Get generated key and secret
- curl -X GET http://localhost:8001/consumers/abc1234/jwt
- 5. Generate JWT Token (HS256)
- Set key to iss(claims)
- Set secret to signature
- 6. Add apiKey header
- curl -X GET http://locahost:8000/api/v1/products
- --header="Authorization=Bearer <Get API JWT Token from previous step>"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement