Auto login and access the Oracle ADF application from Oracle Apex

588 views Asked by At

I am using Oracle Apex 5.1. In that application I need to access Oracle ADF application from Oracle Apex. I used Iframe to view the ADF application from Apex. Since I logged in Oracle apex, I don't want to login it again in ADF application. So I tried to auto login while loading the page using AJAX post method. Browser doesn't allow the request due to cross domain access issues. If any possible way to auto login or where I am going wrong in the code, please help me. Thanks in advance.

Code used to login in Ajax:

$.ajax({
    url: 'https://xxxxxx.co.xx:7302/xxxx/faces/pages/login/login.jspx',
    data: {j_username: "xxxxx",j_password:"xxxxx"},
    type: 'POST',
    crossDomain: true,
    dataType: 'text/html',
    success: function() { alert("Success"); },
    error: function() { alert('Failed!'); },
    headers: {
              'Access-Control-Allow-Origin': '*'
             }
   
}); 

The Error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxxx.co.xx:7302/xxxx/faces/pages/login/login.jspx. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

If any possible way to auto login, please help me. Thanks in advance.

1

There are 1 answers

0
Shay Shmeltzer On

You'll want to use single-sign-on to achieve this, and you'll need to configure the WebLogic server that runs the ADF part to do SSO with your APEX instance. Here is a video about the ADF part - https://www.youtube.com/watch?v=G7X7quNT-58 On the APEX side: http://www.oracle.com/technetwork/developer-tools/apex/learnmore/apex-oam-integration-1375333.pdf