Use 3-Legged OAuth Authentication With Embedded Oracle Analytics Cloud Content

Use the 3-Legged OAuth authentication method when embedding Oracle Analytics Cloud content into a portal or web application that already uses its own method of authentication.

For a seamless user experience, the custom web page and Oracle Analytics Cloud must use the same authentication provider. So in the case of a third-party web application, it would either need to use the same Oracle Cloud authentication provider as Oracle Analytics Cloud (that is, the same Oracle Identity Cloud Service instance or Oracle Cloud Infrastructure Identity and Access Management (IAM) identity domain), or Oracle Analytics Cloud needs to be federated to the third-party authentication provider. 

To allow for proper authentication, you must specify the 3-Legged OAuth parameter for all server requests.

  1. Set the IDCS_OAUTH3LEGGED parameter to true in the embedding.js script reference.
  2. Specify the security configuration type of oauth_3legged to the application using the setSecurityConfig function.

Example

Here project-path specifies the workbook's repository path.

<!DOCTYPE html>
<html dir="ltr">
    <head>
        <script src=""https://<instance>.analytics.ocp.oraclecloud.com/public/dv/v1/embedding/<embedding_method>/embedding.js?IDCS_OAUTH3LEGGED=true" type="application/javascript">
        </script>
    </head>
    <body>
        <div style="position: absolute; width: calc(100% - 40px); height: calc(100% - 120px)" >
            <oracle-dv project-path="/Shared Folders/Embed/Embed Samples">
            </oracle-dv>
        </div>
    <script>
      requirejs(['jquery', 'knockout', 'obitech-application/application', 'ojs/ojcore', 'ojs/ojknockout', 'ojs/ojcomposite', 'jet-composites/oracle-dv/loader'], function($, ko, application) {
      application.setSecurityConfig("oauth_3legged");
      ko.applyBindings();
      });
     </script>
    </body>
</html>