Use 3-Legged OAuth Authentication With Embedded Oracle Analytics Cloud Content
Use the 3-Legged OAuth authentication method when embedding Oracle Analytics Cloud content in a portal or web application that already uses its own authentication method.
For a seamless user experience, the custom web page and Oracle Analytics Cloud must use the same authentication provider. For example, a third-party application can use the same Oracle Cloud identity provider as Oracle Analytics Cloud, or Oracle Analytics Cloud can be federated with the third-party application's identity provider.
With V2, do not add the deprecated IDCS_OAUTH3LEGGED=true parameter to the embedding.js script URL. After the V2 embedding framework is ready, configure the application to use oauth_3legged authentication, then apply bindings.
- Load the V2 embedding script. Select the embedding mode that matches the host application. For example, use
standalonefor an application that does not use Oracle JET. - When
oracle.oa.embedding.ready()resolves, callsetEmbeddingConfig()and specifyoauth_3leggedas the security configuration type. - Apply bindings after the security configuration is set.
- Configure 3-legged OAuth after JavaScript Embedding Framework V2 is ready.
<script> oracle.oa.embedding.ready().then((application) => { application.setEmbeddingConfig({ oSecurityConfig: { eSecurityType: "oauth_3legged" } }); application.applyBindings(); }); </script>
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/v2/embedding/auto/embedding.js"
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>
oracle.oa.embedding.ready().then(function (application) {
application.setEmbeddingConfig({
oSecurityConfig: {
sType: "oauth_3legged"
}
});
application.applyBindings();
});
</script>
</body>
</html>