JSON Web Token Authentication
LAST UPDATED: DEC 5, 2024
JSON Web Token (JWT) enables authentication by encoding claims within a digitally signed token, ensuring secure validation of user identity and permissions. Follow the steps in this article to send a JWT-encoded request in Postman.
Prerequisites
JWT webhook authentication enabled
Ability to set up D3 webhook keys
READER NOTE
Each JWT Remote Command Key will have a unique Secret Key value used in generating the JWT encoding.
Setting Up and Sending a JWT-Encoded Request
Copy the request URL in vSOC.
In Postman, set the HTTP request method to POST, then paste the request URL in the designated field.
In vSOC, copy the request header key.
In Postman, click on the Headers tab, then paste the request header key under the Key column.
In vSOC, copy the object from the Header section.
In jwt.io, ensure that encoding algorithm is HS256, then paste the object into the HEADER field.
In vSOC, copy the payload.
In jwt.io, paste the payload into the PAYLOAD field.
Populate the PAYLOAD fields. For this demonstration, the completed payload is as follows:
READER NOTE
Ensure the value of the payload’s Username field matches the username of the user being granted access to the remote command key (demo_user in this case).
By default, the creator is the only individual with access.
All payload data are case-sensitive.
In vSOC, copy the Secret Key.
In jwt.io, paste the Secret Key.
In vSOC, copy the request body sample data.
In Postman, select the Body tab, choose the raw option, then paste the sample request body data.
Adjust the values to match the payload exactly.
In jwt.io, copy the encoded token.
In Postman, click on the Headers tab, paste in the token, then send the request.