Skip to Content
0
Former Member
May 08, 2008 at 03:27 PM

Logging on to Crystal Enterprise Server using IEnterprisePrincipal

51 Views


Good morning everybody,
I wrote a portlet for viewing and scheduling Crystal Reports for JBoss Portal. This works fine so far. I am currently trying to integrate the user authentification via Single Sign On using JAAS. From what I've seen so far, there is a possibility to authenticate a user against the Crystal Server and retrieve a Principal, representing the authenticated user. This is done via:




IEnterprisePrincipal principal = CrystalEnterprise.getSessionMgr().authenticate(getLoginUser(),

getLoginPassword(),

getCms(),

getAuthType(), Integer.parseInt(validMinutes));









This works as expected, the method returns a Principal with the correct values. After this, I have to logon to the Crystal Server using the provided IEnterprisePrincipal:




Principal principal = renderRequest.getUserPrincipal();

//principal is of type "a", which implements java.security.Principal

if (principal != null) {

enterpriseSession = CrystalEnterprise.getSessionMgr().logon(principal);

}






Unfortunately, when I try to log on using the principal, I get the following exception:



com.crystaldecisions.sdk.exception.SDKException$InvalidArg: Das Argument hat einen ungültigen Wert


which means, that the supplied argument (the principal) has an invalid value.

Have I missed something? Can't I use the IEnterprisePrincipal to logon to a Crystal Server?

Regards,

Sebastian