1

Is there a way to recreate WCToken and WCTrustedToken in websphere commerce by using cookies?

Considering a scenario where search and browse uses websphere commerce and checkout in a different technology leveraging REST api's of websphere commerce.

Shinu
  • 73
  • 2
  • 7
  • 1
    You have to give more information. Also, if you have access, you need to schedule a briefing visit to the development labs. They'll tell you how you should do it to align to product roadmap. – Albert T. Wong Jan 10 '14 at 22:14

4 Answers4

1

The WCToken and WCTrustedToken are composed of a subset of the data used to create the USER_ACTIVITY and AUTHENTICATION cookies. It is therefore possible to recreate them from cookies. However, to do so, you would need to use internal WCS APIs. IBM will not support customization that use those APIs.

Note that the commerce team is looking at improving this area in the future to avoid this type of problem.

Steve McDuff
  • 338
  • 2
  • 11
  • Thanks Steve. Can you share the internal API just for reference if you come across any. – Shinu Nov 18 '13 at 08:46
0

Following APAR would help I guess http://www-01.ibm.com/support/docview.wss?uid=swg1JR45670

https://www.ibm.com/developerworks/community/forums/html/topic?id=0b75439b-b305-4916-bdd0-73ff487acbf3

Sabari
  • 1
  • 1
    Note that [link-only answers](http://meta.stackoverflow.com/tags/link-only-answers/info) are discouraged, SO answers should be the end-point of a search for a solution (vs. yet another stopover of references, which tend to get stale over time). Please consider adding a stand-alone synopsis here, keeping the link as a reference. – kleopatra Feb 19 '14 at 10:41
0

FEP 7 which due for release END of Feb-2014 will have this feature supported. While invoking the api just send the cookies along. If cookies are available then no need for WCToken and WCTrusted tokens in header

Shinu
  • 73
  • 2
  • 7
  • The feature is now available. REST api layer do have the capability to parse the cookie data if **WCToken** and **WCTrustedToken** is not available in header. For more information refer - http://pic.dhe.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.webservices.doc/concepts/cwvrestauthflow.htm?resultof=%22%72%65%73%74%22%20%22%63%6f%6f%6b%69%65%73%22%20%22%63%6f%6f%6b%69%22%20 – Shinu Apr 03 '14 at 10:39
0

You can use CommerceTokenHelper OOB class which has the method generateCommerceTokens. This will use the user Id and generate the WcToken and WcTrustedToken.

techspider
  • 3,370
  • 13
  • 37
  • 61
hema latha
  • 11
  • 1