Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8704

Re: How to bypass SSO for OpenDocument?

$
0
0

Hi Dell,

     Please refer to my custom jsp as follows:

    

<%@ page

import="com.crystaldecisions.sdk.occa.infostore.*,

com.crystaldecisions.sdk.framework.*,

com.crystaldecisions.sdk.exception.*"%>

<%@ page import="java.lang.Exception"%>


//=======================================================================
// Enterprise Logon credentials - customize for your environment.
//=======================================================================
username = <username>;
String cmsname = "xxx.xxx.xxx.xxx";
String sharedSecret = "xxxxxx";

//=======================================================================
// Java OpenDocument URL
//=======================================================================
String port = "8080";
String OpenDocURL = "http://" + cmsname + ":" + port
   + "/BOE/OpenDocument/opendoc/openDocument.jsp";

//=======================================================================
// Logon to Enterprise, create Token, and redirect to OpenDocument
//=======================================================================

try {

 

  ITrustedPrincipal trusted = CrystalEnterprise
    .getSessionMgr()
    .createTrustedPrincipal(username, cmsname, sharedSecret);
   
  IEnterpriseSession ceSession = CrystalEnterprise
    .getSessionMgr().logon(trusted);
  String logonToken = ceSession.getLogonTokenMgr()
    .createLogonToken("", 10, 5);
  ceSession.logoff();
  response.sendRedirect(OpenDocURL + "?token=" + logonToken + "&"
    + request.getQueryString());

} catch (Exception e) {
  System.out.println("Caught inner: " + e);
  response.sendRedirect("loginerror.html");
  return;
}

 

 

 

Best regards,

Sciano


Viewing all articles
Browse latest Browse all 8704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>