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? |
3 answers
![]()
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. |
![]()
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? |
![]()
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 |
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.