OAuth with RTC
2 answers
I have an application developed with the Jazz Foundation Application SDK 3.x.x.x (https://jazz.net/wiki/bin/view/Main/AppSdk) and i need to query workitems of RTC from my application.
It's possible to use the OAuthHelper of that SDK to authenticate in RTC?
How i can do it?
When I try to access the Discovery Service of the RTC to recover the OAuth service I always get the error 301 ("This and all future requests directed to Should Be Given the URI") but did not receive the new service URI. How do I use the Discovery Service of the RTC? The code that has been tried so far:
IDiscoveryHelper discoveryHelper = Discovery.getHelper("https://myserver:9443/ccm/discovery");
IServiceResource oauthservice = discoveryHelper.getService(
DiscoveryConstants.SERVICE_TYPE_OAUTH, null);
It looks like you're trying to call the discovery service on the CCM app (/ccm/discovery), however the discovery service only exists on the JTS. However, if you try to call it on CCM, it will redirect you to the correct URL on the JTS with a 301 response (moved permanently). The new URL is in the Location HTTP header of the response, and should be .../jts/discovery.