1

I'm trying to understand the process and who is responsible for what... and what exactly the external app needs to do on their end etc....

I have so far configure on the salesforce side the following:

1) I have successfully configure on the salesforce creating Connected Apps, assign the sys admin role etc...

API (Enable OAuth Settings) > Enable OAuth Settings > CHECKED Callback URL > https://myhost.com/sfdccanvas

Canvas App Settings > Canvas App URL > https://myhost.com/sfdccanvas>

Now the external app:

2) Client has handed over me the the external app url (https) developed in JAVA and I have https url and I have entered in the Canvas App URL setting

when I try to do test through Canvas App Previewer I see its loading/spinning but nothing shows....

My question is:

What exactly the external app needs to do on their end in order to see their page on the SFDC canvas?

VF page:

<apex:page >

    <apex:canvasApp developerName="MyConnectedCanvasApp" 
         height="1000px" width="800px" 
        parameters="{vst_cli: '1293'}"/>

</apex:page>

1 Answer 1

0

They will need to log all the HTTP request incoming and extract signed request parameter out of the request and verify the Signed request.

The sample is already provided in the repo for reference on how to do this for Java app

<%@ page import="canvas.SignedRequest" %>
<%@ page import="java.util.Map" %>
<%
// Pull the signed request out of the request body and verify/decode it.
Map<String, String[]> parameters = request.getParameterMap();
String[] signedRequest = parameters.get("signed_request");
if (signedRequest == null) {%>
    This App must be invoked via a signed request!<%
    return;
}
String yourConsumerSecret=System.getenv("CANVAS_CONSUMER_SECRET");
//String yourConsumerSecret="1818663124211010887";
String signedRequestJson = SignedRequest.verifyAndDecodeAsJson(signedRequest[0], yourConsumerSecret);
%>

Your Java team needs to exactly follow what sample app provides to get started

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .