Topic
4 replies Latest Post - ‏2013-08-02T07:10:44Z by ShunsukeIshikawa
ShunsukeIshikawa
ShunsukeIshikawa
6 Posts
ACCEPTED ANSWER

Pinned topic WSCredential.getCredentialToken for Liberty Profile

‏2013-08-02T03:42:52Z |

Hi,

Now I am working on migration work from WAS 8.0 based to WLP 8.5.

The problem is that some classes and methods are not found in WLP.

- com.ibm.ws.webservices.engine.encoding.Base64

- WSCredential.getCredentialToken()

Base64 is used to decode LTPA token.

"getCrendentialToken" is used to retrieve LTPA toke from Subject when cookie does not contains LTPA token.

Does anyone know the alternative class or methods for WLP??

Thanks in advance.

 
  • kark
    kark
    26 Posts
    ACCEPTED ANSWER

    Re: WSCredential.getCredentialToken for Liberty Profile

    ‏2013-08-02T04:54:29Z  in response to ShunsukeIshikawa

    Hi,

    The Liberty profile does not use the LTPAToken as it did in the full profile. Why do you need this token and what do you do with this once you decode? We do, however,  have the SSOToken which is the LTPATokenv2 which is stored in the Subject's credentials once the user is authenticated.

    --Ajay

    • ShunsukeIshikawa
      ShunsukeIshikawa
      6 Posts
      ACCEPTED ANSWER

      Re: WSCredential.getCredentialToken for Liberty Profile

      ‏2013-08-02T05:38:28Z  in response to kark

      Hi Ajay,

      Thank you for your prompt reply!

      We are using custom login module and need to support SSO. To do that, we create Subject from decoded LTPAToken (and v2). In most of case, we can get the token in cookie, but just after login case, cookie does not contain it, then we get it from current security subject.

      But it looks like we can do the same thing by SSOToken you mentioned. Could you kindly tell me how to retrieve SSOToken from subject? 

      Thanks.

      • kark
        kark
        26 Posts
        ACCEPTED ANSWER

        Re: WSCredential.getCredentialToken for Liberty Profile

        ‏2013-08-02T06:08:38Z  in response to ShunsukeIshikawa

        How do you configure your loginModule - before or after the WebSphere login modules? Since the subject already contains the SSOToken and SSO is supported by the Liberty profile not sure why you would need that. Are you doing any custom SSO support?

        Anyway, to get the SSOToken you call the Subject.getPrivateCredentials(com.ibm.wsspi.security.token.SingleSignonToken.class) and go through the iterator and get the only one in it. The SSO Token is created during the loginModule authentication process - typically during the commit process.

        --Ajay

        • ShunsukeIshikawa
          ShunsukeIshikawa
          6 Posts
          ACCEPTED ANSWER

          Re: WSCredential.getCredentialToken for Liberty Profile

          ‏2013-08-02T07:10:44Z  in response to kark

          Hi Ajay,

          Thanks a lot! I will try that code.

          Actually, I am not the originator of this part... So I do not the detail requirement of this code. I will ask originator such code is really need or not.

          Thanks.