This family groups a set of actions related to JSON Web Tokens, the standard RFC 7519 method for representing claims securely between two parties.
Connect your JSON web token
To add a JSON web token to Arengu you will need to define Algorithm and Secret.
Sign JSON web token
Generates a JSON web token.
Input settings
Parameter |
Description |
ID (required) |
Action ID. It is used to reference the output values of the action. |
Alias |
Short description to be displayed in the action. |
Connection (required) |
Select an existing connection from the vault or create a new connection with the JWT algorithm and secret. |
Payload |
Data to encode. We recommend to format it according to OpenID standards. |
Subject |
Use it to identify the principal that is the subject of the JWT. |
Issuer |
Use it for the principal that issued the JSON web token (eg. sso.arengu.com). |
Audience |
Use it to provide the recipients that the JWT is intended for (eg. admin.arengu.com). |
Expires in |
Validity time. The time it takes for the JWT to expire. |
Output object
Property |
Type |
Description |
token |
String |
A JSON web token string. |
Output object example
{
"token": "eyJhbGciOiJIUzI1N..."
}
Verify JSON web token
Verifies the JSON web token data, to check if it remains intact or has been modified, in order to guarantee its authenticity.
Input settings
Parameter |
Description |
ID (required) |
Action ID. It is used to reference the output values of the action. |
Alias |
Short description to be displayed in the action. |
Connection (required) |
Select an existing connection from the vault or create a new connection with the JWT algorithm and secret. |
Token (required) |
JSON web token string that will be verified. |
Issuer |
The issuer of the JWT that needs to be verified.
|
Audience |
The recipient audience of the JWT that needs to be verified.
|
Output object
Property |
Type |
Description |
valid |
Boolean |
Returns true or false depending on whether or not the JWT has a valid signature. |
cause |
String |
In case the valid property is false , it will display further information about the causes. |
payload |
Object |
The decoded and valid JSON web token content. |
Output object examples
{
"valid": true,
"header": {
"alg": "HS256",
"typ": "JWT"
},
"payload": {
"sub": "1234567890",
"name": "Jane Doe",
"iat": 1516239022
},
"signature": "SflKxwRJSMe..."
}
{
"valid": false,
"cause": "invalid signature"
}
Decode JSON web token
Decodes a provided JSON web token.
Input settings
Parameter |
Description |
ID (required) |
Action ID. It is used to reference the output values of the action. |
Alias |
Short description to be displayed in the action. |
Token (required) |
JSON web token string that will be decoded. |
Output Object
Property |
Type |
Description |
payload |
Object |
The decoded and valid JSON web token content. |
Output object examples
{
"header": {
"alg": "HS256",
"typ": "JWT"
},
"payload": {
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
},
"signature": "SflKxwRJSMe..."
}
{
"code": "ERR_ACTION_EXECUTION_ERROR",
"message": "Failed to decode token"
}