Skip to content

Build a script that signs JSON Web Tokens in Postman.

License

Notifications You must be signed in to change notification settings

pe8ter/postman-sign-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postman-sign-jwt

Build a script that signs JSON Web Tokens in Postman.

Build the script

Build the Postman script by running this command, which also installs node modules:

npm run start

Use the script

The built Postman script is at dist/pre-request-script.js.

Copy the content of this file and paste it into Postman's Pre-request Script panel. Notice that it sets a Postman environment variable named bearerToken.

If you're on macOS copy the script to the Clipboard with this Terminal command:

pbcopy < dist/pre-request-script.js

Over in the Headers panel, add a header key Authorization whose value is Bearer {{bearerToken}}.

About

Build a script that signs JSON Web Tokens in Postman.

Resources

License

Stars

Watchers

Forks

Packages

No packages published