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

Getting error oauth_problem=invalid_consumer_key when running DoorsOauthSample from https://github.com/OSLC/lyo-samples/blob/master/oslc-java-samples

Hi,

I am running the sample DoorsOauthSample from https://github.com/OSLC/lyo-samples/blob/master/oslc-java-samples.
I am getting following error:

<<<<<<<< HTTP response:
HTTP/1.1 401 Unauthorized
Date: Sun, 09 Aug 2020 11:34:58 GMT
WWW-Authenticate: OAuth realm="https%3A%2F%2Fjazz.net%2Fsandbox01-jts", oauth_problem="invalid_consumer_key"
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Content-Language: en-US
Content-Length: 34
Strict-Transport-Security: max-age=31536000; includeSubDomains
Cache-Control: proxy-revalidate
Connection: Keep-Alive
Set-Cookie: Node=jazzweb1|Xy/fZ; path=/
Set-Cookie: BCSI-CS-87974f0cf329b5ec=1; Path=/

oauth_problem=invalid_consumer_key
at net.oauth.client.OAuthResponseMessage.toOAuthProblemException(OAuthResponseMessage.java:83)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:308)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:262)
at net.oauth.client.OAuthClient.getRequestTokenResponse(OAuthClient.java:192)
at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:150)
at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:126)
at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:106)
at org.eclipse.lyo.client.oslc.OslcOAuthClient.getResourceInternal(OslcOAuthClient.java:212)
at org.eclipse.lyo.client.oslc.OslcOAuthClient.getResource(OslcOAuthClient.java:96)
at org.eclipse.lyo.client.oslc.samples.DoorsOauthSample.main(DoorsOauthSample.java:155)

What could be the issue?
I am able to get the ServiceProviders using Postman HTTP Client.

0 votes

Comments
I am able to get the ServiceProviders using Postman HTTP Client.
You are able to do that using OAuth?


I am sorry if I was not clear in my question. 

When I run the DoorsOAuthSample I get the above exception. However if I try to access the catalog using Postman Http Client it works. My question is why it is not working through DoorsOAuthSample?
Hope I am clear now.


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
× 10,938
× 1,700

Question asked: Aug 09 '20, 1:13 p.m.

Question was seen: 1,040 times

Last updated: Aug 12 '20, 1:41 p.m.

Confirmation Cancel Confirm