Problem authorizing requests in JIRA OSLC Adapter through OAuth
When I authorize a REST request on the OSLC Adapter for JIRA using all necessary OAuth credentials, I get the following answer from the server:
The remote server returned an error: (401) Unauthorized. Header: Server: Apache-Coyote/1.1 WWW-Authenticate: OAuth realm="http%3A%2F%2Flocalhost%3A8080",OAuth realm="http%3A%2F%2Flocalhost%3A8080", oauth_problem="token_rejected" Content-Type: application/x-www-form-urlencoded;charset=UTF-8 The OAuth token has been successfully authenticated before though - could the problem lie in the OAuth realm? |
2 answers
Can you list the steps you used when making the REST request? What REST client are you using and how did you do the OAuth authentication?
Comments
Jaroslav Klimes
commented Oct 03 '12, 7:27 a.m.
Hi, I have developed the client myself, it is written in C# and bases on the OAuthBase library. The authentication steps are performed as follows:
Jaroslav Klimes
commented Oct 03 '12, 7:32 a.m.
An example of the request that accesses protected resources:
Jaroslav Klimes
commented Oct 10 '12, 4:35 a.m.
Just a remark: The "10.1.2.50" and "localhost" refer to the same computer in this case, I have made sure the difference here does not cause the above described issue. Sorry for the confusion.
|
It looks like your access is using OAuth 1.0. OAuth 2.0 doesn't support (or at least strongly suggests against) passing access token information via the URL query parameters, which it looks like you have done in your example. The JIRA OSLC plugin doesn't support query parameter passing of the oauth paramters.
|
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.