How can I retrieve OAuth tokens?
3 answers
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?
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?