cancel
Showing results for 
Search instead for 
Did you mean: 

JCO3 and SSO

Former Member
0 Kudos

Hi everyone,

how is the proposed way to using Java Connector 3 Client with Single Sign-On for the two scenarios:

- Using SAP Logon Ticket

- Providing username/password programmatically (e.g. after getting them from the portal's user mapping)

There is a property jco.client.mysapsso2 in DestinationDataProvider. Do I have to specify a new JCoDestination for each user (session)? This is not the way I would expect it to work, for basically I would like to create one destination for each R/3 system I access.

Thanks in advance!

Carsten

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

you could write and register your own DestinationDataProvider and overwrite the method getDestinationProperties(String destinationName)

you could then define some sort of mapping - e.g. adding the sso ticket to the destinationName and then in the method return the properties with the jco.client.mysapsso2 with the sso ticket

could look like this

JCoDestinationManager.getDestination("myserver1|ssoticket").

regards franz

Answers (1)

Answers (1)

Former Member
0 Kudos

In the meantime I found out how to do it right:


// After getting the desired destination, create a custom destination for it
JCoDestination destination = JCoEnvironment.getDestination( "<DestinationName>" );
JCoCustomDestination custDest = destination.createCustomDestination();

// From the custom destination you can get and manipulate the corresponding UserData object
UserData data = custDest.getUserLogonData();

// On this object you can set the desired fields (see Javadoc for UserData for more information)
data.setAliasUser( ... );
data.setClient( ... );
data.setLanguage( ... );
data.setPassword( ... );
data.setSSOTicket( ... );
data.setUser( ... );
data.setX509Certificate( ... );

// Then, use the custom destination to do things
JCoContext.begin( custDest );
...
JCoContext.end( custDest );

I only tried it using a different user/password combination than configured and it worked. Didn't yet try with SSO.

Note that JCo creates one physical connection to the R/3 system when getting the destination and a second when creating the custom destination.

Edited by: Carsten Erker on Apr 1, 2009 10:32 PM