Created
December 22, 2015 08:12
-
-
Save joeartsea/8adb3b5d1713a3c66682 to your computer and use it in GitHub Desktop.
Force.com Canvasのsigned-requestを検証&デコードするNode-REDノード ref: http://qiita.com/joeartsea/items/e9c3a65fbc68c0212100
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
$ node-red-admin target <Node-REDのエディタ画面のURL 例:https://node-red-123.herokuapp.com/red> | |
$ node-red-admin login | |
Username: <Herokuにデプロイする時に設定したユーザ名> | |
Password: <Herokuにデプロイする時に設定したパスワード> | |
Logged in | |
$ node-red-admin install node-red-contrib-force | |
Module: node-red-contrib-force | |
Version: 0.0.6 | |
Nodes Types State | |
node-red-contrib-force/chatter force-chatter in enabled | |
node-red-contrib-force/forcedotcom force enabled | |
force in | |
node-red-contrib-force/forcedotcom-bulk force-bulk in enabled | |
node-red-contrib-force/forcedotcom-signed-request force signed request enabled |
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
This is the payload: {{payload.aaa}} ! |
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
<apex:page > | |
<apex:canvasApp developerName="test" /> | |
</apex:page> |
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
<ul>{{#payload.records}}<li>{{Id}} : {{Name}}</li>{{/payload.records}}</ul> |
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": "4f9b24d7.b064dc", | |
"type": "force", | |
"z": "", | |
"username": "", | |
"loginurl": "https://login.salesforce.com", | |
"logintype": "Signed-Request" | |
}, { | |
"id": "68be3f5.f9741c", | |
"type": "debug", | |
"z": "569fcd48.a96034", | |
"name": "", | |
"active": true, | |
"console": "false", | |
"complete": "false", | |
"x": 513, | |
"y": 222, | |
"wires": [] | |
}, { | |
"id": "d1e76ece.2e189", | |
"type": "http in", | |
"z": "569fcd48.a96034", | |
"name": "", | |
"url": "/canvas", | |
"method": "post", | |
"swaggerDoc": "", | |
"x": 125, | |
"y": 63, | |
"wires": [ | |
["f70ef5e8.08f108"] | |
] | |
}, { | |
"id": "f70ef5e8.08f108", | |
"type": "force signed request", | |
"z": "569fcd48.a96034", | |
"force": "4f9b24d7.b064dc", | |
"name": "", | |
"x": 320, | |
"y": 64, | |
"wires": [ | |
["870ac031.78f54"] | |
] | |
}, { | |
"id": "870ac031.78f54", | |
"type": "change", | |
"z": "569fcd48.a96034", | |
"name": "", | |
"rules": [{ | |
"t": "set", | |
"p": "payload", | |
"to": "Select Id, Name From Account" | |
}], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 526, | |
"y": 64, | |
"wires": [ | |
["9238e368.6dc72"] | |
] | |
}, { | |
"id": "9238e368.6dc72", | |
"type": "force in", | |
"z": "569fcd48.a96034", | |
"force": "4f9b24d7.b064dc", | |
"operation": "query", | |
"sobject": "", | |
"extname": "", | |
"name": "", | |
"x": 128, | |
"y": 135, | |
"wires": [ | |
["68be3f5.f9741c", "7612ac7f.89ed54"] | |
] | |
}, { | |
"id": "5e74439f.a18bbc", | |
"type": "http response", | |
"z": "569fcd48.a96034", | |
"name": "", | |
"x": 494, | |
"y": 135, | |
"wires": [] | |
}, { | |
"id": "7612ac7f.89ed54", | |
"type": "template", | |
"z": "569fcd48.a96034", | |
"name": "", | |
"field": "payload", | |
"format": "handlebars", | |
"template": "<ul>{{#payload.records}}<li>{{Id}} : {{Name}}</li>{{/payload.records}}</ul>", | |
"x": 310, | |
"y": 137, | |
"wires": [ | |
["5e74439f.a18bbc"] | |
] | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment