Topic
  • 2 replies
  • Latest Post - ‏2012-09-20T11:40:13Z by SystemAdmin
HATS_Developer
HATS_Developer
1 Post

Pinned topic Bypass Workplace XT login screen using user token

‏2011-03-24T17:59:34Z |
We have CE 4.5.1 , Workplace XT 1.1.4.8 deployed on Websphere Application Server 7.0 on linux.
I have a custom web application which creates url containing user token to open a document.
User token is generated using java api as follows:

Session oSession = com.filenet.wcm.api.ObjectFactory.getSession("AppID", null, strUserId, strPassword);
oSession.setConfiguration(new FileInputStream ("WcmApiConfig.properties"));
String strUserToken = oSession.getToken();

Url is generated in following format:

http://server:9084/WorkplaceXT/getContent?id={234DFDB0-D435-4455-BSD7-9ESD45525}&vsId={34245C8C-4EFE-4453-90DA-4EF4FE45BAA}&objectType=document&objectStoreName=OBSTR&impersonate=true&ut=clear:userid:gjgkgjugTU:locale:ZW5fVVM=:datetime:MTMwMDMyMzg1OQ==:password:Ygjuy8ZTE=:appid:RmkjhhiuUYA==

I think we can avoid login screen as user token is passed in url. But even though user token is pased I am still getting login screen. I checked bootstrap.properties file for acceptTokens/generateTokens properties and both of them are true.
But when I view bootstrap properties using workplace XT, property Generate user tokens is 'Yes' but property Accept user tokens is 'No'. I tried to change it to 'Yes' but it again reverts back to 'No'.
I don't see any error message in logs.

Can someone tell how to resolve this issue?

Thanks
Updated on 2012-09-20T11:40:13Z at 2012-09-20T11:40:13Z by SystemAdmin
  • SanjayKSharma
    SanjayKSharma
    1 Post

    Re: Bypass Workplace XT login screen using user token

    ‏2011-04-01T19:51:47Z  
    Did you find the solution for this? I am also running into the exactly same issue.

    Sanjay
  • SystemAdmin
    SystemAdmin
    693 Posts

    Re: Bypass Workplace XT login screen using user token

    ‏2012-09-20T11:40:13Z  
    Did you find the solution for this? I am also running into the exactly same issue.

    Sanjay
    Have you tried this..!!!
    Session myCESession = null;
    try {
    myCESession = ObjectFactory.getSession("Workplace", Session.CLEAR, userName, userToken);
    myCESession.setConfiguration(new FileInputStream(ReadProperty.getProperty("WCM_API_CONFIG")));
    myCESession.verify();
    System.out.println("Token :" +myCESession.getToken());
    } catch (FileNotFoundException e) {
    e.printStackTrace();
    }
    //Print the document in UI ...
    out.print("<td width='20%' style='word-wrap:break-word'>/WorkplaceXT/getContent?objectStoreName=" +
    ""objstore.get_Name()"&id="strdocId "&objectType=document&ut="myCESession.getToken()"', '','');