+ Start a Discussion
zgcharley_09zgcharley_09 

How to sign request for Canvas app?

The Canvas App configured a Canvas URL, like http://xxx.herokuapp.com/canvas. I think all of the requests sent from Canvas app page will go to this endpoint. For example, there's a "Get" button in my page and by clicking this button to fetch some data from app server(hosted at Heroku). And at this time, the request address is the Canvas URL, am I right?

According to the developer guide of Canvas app, the request sent to app server need be signed. So another question is, when I clicking the "Get" button, how do I sign this request?

Thanks in advance1
Deepak Kumar ShyoranDeepak Kumar Shyoran
Hope following link will help you 
http://www.salesforce.com/us/developer/docs/platform_connect/Content/canvas_app_unsigning_code_example.htm
zgcharley_09zgcharley_09
@Deepak kumar.. Thanks for your reply.
Then link you provided is on how to decode/verify a signed reqeust on app server side. My problem is how to sign a reqeust at app page side(client). After reading the developer guide again, it makes me think, the signed request may only need when initializing the app, that Salesforce loads the canvas app. After that, we don't need to sign the request. For example, when clicking the "Get" button in the app page, we don't sign this Get request.

But I'm not very sure about the thought, it's not safe if we don't sign requests....