jwt.json•4.61 kB
{
"nodeType": "n8n-nodes-base.jwt",
"displayName": "JWT",
"description": "JWT",
"version": 1,
"properties": [
{
"name": "operation",
"displayName": "Operation",
"type": "options",
"default": "sign",
"options": [
{
"name": "Decode",
"value": "decode"
},
{
"name": "Sign",
"value": "sign"
},
{
"name": "Verify",
"value": "verify"
}
]
},
{
"name": "useJson",
"displayName": "Use JSON to Build Payload",
"type": "boolean",
"default": false,
"description": "Whether to use JSON to build the claims",
"displayOptions": {
"show": {
"operation": [
"sign"
]
}
}
},
{
"name": "claims",
"displayName": "Payload Claims",
"type": "collection",
"default": {},
"description": "Identifies the recipients that the JWT is intended for",
"placeholder": "Add Claim",
"options": [
{
"name": "audience",
"displayName": "Audience",
"type": "string",
"default": "",
"description": "Identifies the recipients that the JWT is intended for",
"placeholder": "e.g. https://example.com"
},
{
"name": "expiresIn",
"displayName": "Expires In",
"type": "number",
"default": 3600,
"description": "The lifetime of the token in seconds",
"placeholder": "e.g. 3600"
},
{
"name": "issuer",
"displayName": "Issuer",
"type": "string",
"default": "",
"description": "Identifies the principal that issued the JWT",
"placeholder": "e.g. https://example.com"
},
{
"name": "jwtid",
"displayName": "JWT ID",
"type": "string",
"default": "",
"description": "Unique identifier for the JWT",
"placeholder": "e.g. 123456"
},
{
"name": "notBefore",
"displayName": "Not Before",
"type": "number",
"default": 0,
"description": "The time before which the JWT must not be accepted for processing"
},
{
"name": "subject",
"displayName": "Subject",
"type": "string",
"default": "",
"description": "Identifies the principal that is the subject of the JWT"
}
],
"typeOptions": {
"minValue": 0
},
"displayOptions": {
"show": {
"operation": [
"sign"
],
"useJson": [
false
]
}
}
},
{
"name": "claimsJson",
"displayName": "Payload Claims (JSON)",
"type": "json",
"default": "{\\n \"my_field_1\": \"value 1\",\\n \"my_field_2\": \"value 2\"\\n}\\n",
"description": "Claims to add to the token in JSON format",
"typeOptions": {
"rows": 5
},
"displayOptions": {
"show": {
"operation": [
"sign"
],
"useJson": [
true
]
}
}
},
{
"name": "token",
"displayName": "Token",
"type": "string",
"default": "",
"description": "The token to verify or decode",
"required": true,
"displayOptions": {
"show": {
"operation": [
"verify",
"decode"
]
}
}
},
{
"name": "options",
"displayName": "Options",
"type": "collection",
"default": {},
"description": "Whether to return the complete decoded token with information about the header and signature or just the payload",
"placeholder": "Add option",
"typeOptions": {
"minValue": 0
},
"displayOptions": {
"show": {
"/operation": [
"verify",
"decode"
]
}
}
}
],
"credentialsConfig": [
{
"name": "jwtAuth",
"required": true
},
{
"name": "operation",
"required": false
},
{
"name": "useJson",
"required": false
},
{
"name": "claimsJson",
"required": true
}
],
"io": {
"inputs": [],
"outputs": [],
"outputNames": [],
"hints": {}
},
"wiring": {
"role": "generic",
"requires": [],
"optional": [],
"consumedBy": [],
"consumes": [],
"produces": []
}
}