This collection contains a request with an example of how to create a JSON web token using the Postman Sandbox.
How to use it:
- Add the header of the jwt to the
header
variable in thePre-request Script
section. - Add the payload of the jwt to the
payload
variable in thePre-request Script
section. - Create an environment variable called
secret
and add there the value of the jwt secret. - Create an environment variable called
expectedToken
and add there the value of a token built in the debugger fromhttps://jwt.io/
with exactly the same data you used in this request. - Send the request.
- Check all tests from the
Tests
section passed.