Created
April 12, 2024 17:25
-
-
Save ProfAndreaPollini/c377800eac86ec4f76a0d6f539a77057 to your computer and use it in GitHub Desktop.
mag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "21431df41ab893cc", | |
"type": "tab", | |
"label": "Flow 1", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ | |
"id": "2f95b2462d999f50", | |
"type": "inject", | |
"z": "21431df41ab893cc", | |
"name": "", | |
"props": [ | |
{ | |
"p": "payload" | |
} | |
], | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"payload": "{\"ciao\":\"ciao\",\"prova\":2}", | |
"payloadType": "json", | |
"x": 290, | |
"y": 80, | |
"wires": [ | |
[ | |
"4dd0012bede3042e" | |
] | |
] | |
}, | |
{ | |
"id": "4dd0012bede3042e", | |
"type": "json", | |
"z": "21431df41ab893cc", | |
"name": "", | |
"property": "payload", | |
"action": "", | |
"pretty": false, | |
"x": 550, | |
"y": 80, | |
"wires": [ | |
[ | |
"f6e1b78ef80bec67", | |
"859a0f9b7b745579" | |
] | |
] | |
}, | |
{ | |
"id": "f6e1b78ef80bec67", | |
"type": "debug", | |
"z": "21431df41ab893cc", | |
"name": "debug 1", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 860, | |
"y": 80, | |
"wires": [] | |
}, | |
{ | |
"id": "859a0f9b7b745579", | |
"type": "function", | |
"z": "21431df41ab893cc", | |
"name": "function 1", | |
"func": "\nfunction HMAC1(data,key){\n let hmac = cryptoJs.algo.HMAC.create(cryptoJs.algo.SHA1,key)\n hmac.update(data);\n return hmac.finalize().toString();\n}\n\nmsg.signature = HMAC1(msg.payload, \"abcde\");\n\nreturn msg", | |
"outputs": 1, | |
"timeout": 0, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"libs": [ | |
{ | |
"var": "cryptoJs", | |
"module": "crypto-js" | |
} | |
], | |
"x": 660, | |
"y": 260, | |
"wires": [ | |
[ | |
"f6e1b78ef80bec67", | |
"b3f747ed9670e6f9" | |
] | |
] | |
}, | |
{ | |
"id": "b3f747ed9670e6f9", | |
"type": "http request", | |
"z": "21431df41ab893cc", | |
"name": "", | |
"method": "GET", | |
"ret": "txt", | |
"paytoqs": "body", | |
"url": "http://158.180.239.120:5000/", | |
"tls": "", | |
"persist": false, | |
"proxy": "", | |
"insecureHTTPParser": false, | |
"authType": "", | |
"senderr": false, | |
"headers": [ | |
{ | |
"keyType": "other", | |
"keyValue": "X-MagazzinoDelSole-Signature", | |
"valueType": "msg", | |
"valueValue": "signature" | |
}, | |
{ | |
"keyType": "other", | |
"keyValue": "Content-Type", | |
"valueType": "other", | |
"valueValue": "application/json" | |
} | |
], | |
"x": 850, | |
"y": 320, | |
"wires": [ | |
[ | |
"7b88203ef416565f" | |
] | |
] | |
}, | |
{ | |
"id": "7b88203ef416565f", | |
"type": "debug", | |
"z": "21431df41ab893cc", | |
"name": "debug 2", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 1140, | |
"y": 220, | |
"wires": [] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment