Decode JWT
Decodes a JSON Web Token (JWT) and returns its payload, and can optionally verify the token's signature with a secret.
What it does
- Decodes the provided JWT and returns the decoded payload.
- When a secret is provided, verifies the token's signature and only returns the payload if it is valid.
- Reports success as false when the token cannot be decoded or verification fails.
Inputs
| Name | Type | Description |
|---|---|---|
| Received JWT | String | Received JWT |
| DG API Secret | Optional String | DG API Secret |
Outputs
| Name | Type | Description |
|---|---|---|
| Decoded Payload | Object | Decoded Json Object |
| Success | Boolean | Success |
Notes
- If no secret is provided, the token is decoded without verifying its signature.