Topic
  • 2 replies
  • Latest Post - ‏2012-08-06T14:34:06Z by MSTDevTeam
MSTDevTeam
MSTDevTeam
4 Posts

Pinned topic LogIn with UserToken - IBM CM v8.4

‏2012-07-31T08:47:33Z |
I have a java application which authenticates a CM8 user with UserNamr Password using existing CM8 APi's, below is the code snippet:

// Create connection bean
CMBConnection connection = new CMBConnection();

// Set properties on connection bean
// Set the DataStore type to indicate Content Manager
connection.setDsType(dataStoreType);

// Set the Library Server name
connection.setServerName(databaseName);

// Set the user id and password for authentication
connection.setUserid(uName);
connection.setPassword(uPassword);

// Get the connection
connection.connect();
However, the requirement has changed and now UserToken is being passed as an input to my java application. Can anybody help to provide some code sample to authenticate the user using the usertoken or if I can use any of the existing CM8 API's to retrieve UserName & Password from the USerToken.
  • JKMorrow
    JKMorrow
    44 Posts

    Re: LogIn with UserToken - IBM CM v8.4

    ‏2012-08-01T18:17:15Z  
    On your CMBConnection you can:
    connection.setCredential(java.lang.Object object)
    connection.connect()

    Running under websphere you can use the LTPA token (a string) that WAS generates, and use that to authenticate. We've done this and it works well. Be sure that you have the AllowTrustedLogon privilege checked for the users privilege set.
  • MSTDevTeam
    MSTDevTeam
    4 Posts

    Re: LogIn with UserToken - IBM CM v8.4

    ‏2012-08-06T14:34:06Z  
    • JKMorrow
    • ‏2012-08-01T18:17:15Z
    On your CMBConnection you can:
    connection.setCredential(java.lang.Object object)
    connection.connect()

    Running under websphere you can use the LTPA token (a string) that WAS generates, and use that to authenticate. We've done this and it works well. Be sure that you have the AllowTrustedLogon privilege checked for the users privilege set.
    Thank You for the reply. I will try that and let you know. Meanwhile a new query has popped up. If CM8 is setup with a icmconnect ID which does not require a password.

    This new “icmconnect” id will just be used by the web service. This new id would be set up to not require a password. We can put this new id in the cmbicmenv.ini file and deploy it on the CM8 web service WAS. We would also need to have the users for this application set up in CM8 security to have trusted logon. This will allow the application to call the CM8 web service with just an id and not a password. eClient will still use the original “icmconnect” id that requires a password.

    Will the below code work with this new icmconnect ID, which does not require a password?

    // Create connection bean
    CMBConnection connection = new CMBConnection();

    // Set properties on connection bean
    // Set the DataStore type to indicate Content Manager
    connection.setDsType(dataStoreType);

    // Set the Library Server name
    connection.setServerName(databaseName);

    // Set the user id and password for authentication
    connection.setUserid(uName);

    // Get the connection
    connection.connect();