It's all about the answers!

Ask a question

How can I retrieve OAuth tokens?


Cecilia Lindgren (431213) | asked Nov 24 '10, 7:16 a.m.
I have set up my RTC with another system that uses OAuth.
Now I want to send a PUT from RTC to that system.

How do I retrieve the OAuth tokens and the rest OAuth parameters needed for the request?

3 answers



permanent link
John Vasta (2.6k15) | answered Nov 28 '10, 1:25 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
The Application SDK includes classes to assist in implementing the OAuth protocol. The main class is com.ibm.team.jfs.app.oauth.OAuthHelper. See this article for a description of how to use the SDK to implement support for OAuth:

https://jazz.net/wiki/bin/view/Main/AppSdkDelegatingAuth

permanent link
Mattias Berglund (56111) | answered Nov 25 '10, 5:51 a.m.
Thanks for the answer, but it does not really answering our question.

To describe the question a bit more:
We have set up a Cross Server connection from RTC (S1) to another OSLC server (S2). So we have the consumer key/secret.
A work item is created in S2 and that system is also creating the work item in S1. In this work item we store the REST URL to the item in S2 in oslc_cm:relatedChangeManagement.
When the user is performing a specific action in RTC, we want the update the item in S2. To do this we are writing a plugin that should PUT information to the URL stored in the work item. And here we have the problem. We have to send the oauth_token (and oauth_signature, oauth_timestamp... etc) in the Authorization header. This information is, like described in the link, fetched by using request_token, authorize and access_token urls in the rootservices document. But if a user has done this once, the oauth_token and secret is stored somewhere in RTC (this we have noticed since we only have to log on once to S2 when we are adding a related to service provider).
So the question is: How can we, codewise, get/generate oauth_token, oauth_signature, oauth_nonce etc to be able to PUT a request to a Cross Server?

permanent link
Brent Barkman (156) | answered Nov 24 '10, 11:12 a.m.
JAZZ DEVELOPER
This information is advertised in the rootservices document (e.g. https://jazz.net/jazz/rootservices), see this wiki page for more information on it:

https://jazz.net/wiki/bin/view/Main/RootServicesSpec#OAuth_Service_Provider_Propertie

It includes information on the oauth token url's.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.