+ Start a Discussion
basha skbasha sk 

How to login to adobeconnect through Iframes in Salesforce

Hi Everyone,


I'm trying to open the adobe connect home page from salesforce.For that I have  developed REST  api.
when I click the button from visualforce page it sends call to adobeconnect.I checked in debug logs
I got the status code 200.Call is working successfully but here after clicking the button I wanted to
direct home page of adobe connect but it displays adobe connect login page.

Button page
-----------

<apex:page standardController="Webinar__c" extensions="CreateAdobeWebinar" sidebar="false"  >
  <apex:pageBlock title="Adobe Connect Webinars List" >
    <apex:form >   
         <center>
           <apex:commandButton value="Create a Webinar" action="{!processButtonClick}"/>     
         </center>
    </apex:form >
</apex:pageBlock>
<apex:page>


Apex class :
-------------
public class CreateAdobeWebinar {

   public PageReference processButtonClick() {
   
    LightiningEd__Login_Access__c lst1 = [select id,Name,LightiningEd__username__c,LightiningEd__password__c,LightiningEd__url__c
                                             ,LightiningEd__Cookie__c from LightiningEd__Login_Access__c limit 1];
 
    CreateWebinar.postfieldsFuture(username,password,url,accesstoken);
        PageReference pageref = new PageReference('/apex/AdobeIframe');
        return pageref;
   }

REST API
---------

global class CreateWebinar{   
     
    global static void postfieldsFuture(String username, String password,String url,String accesstoken) {
        
        getParticipants(username, password, url,accesstoken);
    }
       
    @future (callout=true)
    global static void getParticipants(String username, String password,String url,String accesstoken){  
         
        Http http = new Http();
        HttpRequest req =  new HttpRequest();  
        HttpResponse res =  new HttpResponse();  
        Blob headerValue = Blob.valueOf(username + ':' + password);
        String authorizationHeader = 'BASIC ' +
        EncodingUtil.base64Encode(headerValue);
        req.setHeader('Authorization', authorizationHeader);              
        req.setEndpoint(url+'/api/xml?action=login&login='+username+'&password='+password+'&session='+accesstoken);                      
        req.setMethod('GET');
        req.setHeader('Content-Type', 'application/json');
        req.setHeader('Accept','application/json');
        try {
            res = http.send(req);
            System.debug('MyResult == :'+res.getBody());                      
        }catch(System.CalloutException e){
               System.debug('Callout error: '+ e);              
    }
  }                  
}

Redirect page :
----------------

Here in this I want to display the direct home page of adobe connect.but here it displays adobe connect login page .

<apex:page standardController="Webinar__c" tabstyle="Webinar_Room__tab" sidebar="false" extensions="CreateAdobeWebinar,RedirectPage">
    <apex:form >
     <center>                
           <apex:commandButton value="Goback" action="{!goBackPage3}"/>    
         </center><br/><br/>
        <apex:pageBlock title="Create Adobe Webinar within Salesforce">
        </apex:pageBlock>
    </apex:form>
    <apex:iframe height="800" width="1230" src="https://meet30705009.adobeconnect.com/" scrolling="true"/>
</apex:page>


Please check it once if anybody having idea let me know

Thanks in advance,
Basha