cancel
Showing results for 
Search instead for 
Did you mean: 

Login to SAP BOE CMC using logon token

View Entire Topic
Joe_Peters
Active Contributor
0 Kudos
I eventually got it to work.  It was a long time ago, and I don't remember what I did wrong the first time, but this is how I did it:

String token = iES.getLogonTokenMgr().getDefaultToken();
Cookie ckCMC = new Cookie("CMCPLATFORMSVC_COOKIE_TOKEN", token);

ckCMC.setPath("/");
response.addCookie(ckCMC);
response.sendRedirect("/BOE/CMC");
0 Kudos

Can we just not use

BOE/CMC/logon/start.do?ivsLogonToken="+java.net.URLEncoder.encode(defaultToken)

like we use to login to BI launch pad?

Because i want to bypass the loginpage of CMC

Joe_Peters
Active Contributor
0 Kudos

I don't believe that method works with CMC, that's why I had to use a cookie. But that was in 4.1 -- maybe it works now in 4.2.

0 Kudos

but even after using cookie iam not able to bypass the CMC login screen, it just redirects to default CMC login page

Joe_Peters
Active Contributor
0 Kudos

How are you retrieving the token?

0 Kudos

Iam trying to generate a token for a particular username and password as shown below

enterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME,BO_PASSWORD, BO_CMS_NAME,BO_AUTH_TYPE);

logonTokenMgr = enterpriseSession.getLogonTokenMgr();

defaultToken = logonTokenMgr.createWCAToken("", 20, 1);

Cookie ckCMC = new Cookie("CMCPLATFORMSVC_COOKIE_TOKEN", defaultToken);

ckCMC.setPath("/");

response.addCookie(ckCMC);

response.sendRedirect("/BOE/CMC");

Thanks

Joe_Peters
Active Contributor
0 Kudos

Try getLogonTokenMgr().getDefaultToken()

0 Kudos

Not working , it redirects me to the traditional CMC login page