Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can I retrieve OAuth tokens?

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?

0 votes



3 answers

Permanent link
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

0 votes


Permanent link
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?

0 votes


Permanent link
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.

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,926

Question asked: Nov 24 '10, 7:16 a.m.

Question was seen: 8,335 times

Last updated: Nov 24 '10, 7:16 a.m.

Confirmation Cancel Confirm