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

OAuth 1.0 Access Token Request is returning parameter absent

Hello everyone,

We’re trying to generate a token for Jazz using OAuth 1.0, but we’re stuck when performing the last step.

For this, we mainly looked into these 2 resources: <o:p> </o:p>

OAuth Core 1.0 <o:p> </o:p>

ELMandOAuth10a < Deployment < TWiki (jazz.net) <o:p> </o:p>

<o:p>   </o:p>

We have a obtained a consumer key and consumer secret and according to the documentation we have to perform the following steps: <o:p> </o:p>

  1. Obtain request token: <o:p> </o:p>

curl --location --request GET 'https://server/domain/oauth-request-token?oauth_signature_method=HMAC-SHA1&oauth_consumer_key=cons_key&oauth_signature=P9RgokFJD6hgcvlpKHHjCIjwsQo=&oauth_timestamp=1688715450&oauth_nonce=68575481&oauth_callback=oob&oauth_version=1.0' \ <o:p> </o:p>

--header 'Accept: application/rdf+xml' \ <o:p> </o:p>

-header 'Authorization: OAuth oauth_consumer_key="cons_key",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1689054590",oauth_nonce="uTXXqd7rgT5",oauth_version="1.0",oauth_signature="6PxVmV1nYytUTL6El934loejVVQ%3D"' \ <o:p> </o:p>

 

response: 200 OK <o:p> </o:p>

response body: oauth_token=3f66534e27bb40ba90c5d12ebd69e50a&oauth_token_secret=p3IlaIiQVGO8LKKwqu5QEpLedneg0JrfnrRvj4DDYs <o:p> </o:p>

 

For generating the signature we created a script in java and we are encrypting using the consumer secret as a private key. <o:p> </o:p>

<o:p>   </o:p>

  1. Authorize the token obtained previously: <o:p> </o:p>

<o:p>   </o:p>

curl --location --request GET 'https://server/domain/oauth-authorize?oauth_token=3f66534e27bb40ba90c5d12ebd69e50a&oauth_token_secret=p3IlaIiQVGO8LKKwqu5QEpLedneg0JrfnrRvj4DDYs' \ <o:p> </o:p>

--header 'Authorization: Basic with username and password <o:p> </o:p>

 

response: 200 OK <o:p> </o:p>

response body: <h4>You have allowed the server &quot; OIDC test for Token Based Authentication&quot; to collaborate <o:p> </o:p>

                    with the server &quot;https://server/domain/&quot; using the &quot;userID&quot; user ID. <o:p> </o:p>

                    </h4> <o:p> </o:p>

 

<o:p>   </o:p>

  1. Obtain Access token (where we have the problem): <o:p> </o:p>

<o:p>   </o:p>

curl --location --request POST 'https://server/domain/oauth-access-token?oauth_signature_method=HMAC-SHA1&oauth_consumer_key=cons_key&oauth_nonce=28467620&oauth_timestamp=1688975760&oauth_token=3f66534e27bb40ba90c5d12ebd69e50a&oauth_version=1.0&oauth_signature=6dBHo8t5nDHa1euKmSowq/u81o0=' \ <o:p> </o:p>

--header 'Accept: application/rdf+xml' \ <o:p> </o:p>

--header 'Content-Type: application/x-www-form-urlencoded' \ <o:p> </o:p>

--header 'Authorization: OAuth oauth_consumer_key="cons_key",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1689065610",oauth_nonce="TcKkh7y8DLV",oauth_version="1.0",oauth_signature="ggYfo6yr3VP35KcGV5sSY%2F6nLZc%3D"' \ <o:p> </o:p>

<o:p>   </o:p>

response: 400 Bad Request <o:p> </o:p>

response body: oauth_problem=parameter_absent <o:p> </o:p>

<o:p>   </o:p>

<o:p>   </o:p>

We cannot figure out what is missing. <o:p> </o:p>

<o:p>   </o:p>

Your help will be much appreciated. <o:p> </o:p>


Best regards,

Ana

0 votes

Comments

 Hi Ralph,


The links you provided are for OAuth2.0, but we managed to get a consumer key and consumer secret for OAuth1.0. From what I've seen OAuth 1.0 and OAuth 2.0 need a completely different set up.

Do you recommend using 2.0 instead of 1.0?


Thanks,
Ana



This is what I can find for OAuth 1: https://www.google.com/search?q=OAuth+1.0+site%3Ajazz.net 

I had my own struggles with OAuth and can probably not solve your problem, however, I knew there are a few documentations around and try to point you to other resources. 

1 vote


Be the first one to answer this question!

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
× 11,079

Question asked: Jul 11 '23, 5:18 a.m.

Question was seen: 1,818 times

Last updated: Jul 12 '23, 3:28 a.m.

Confirmation Cancel Confirm