How to get the request token during OAuth dance when invoking OSLC from DOORS with Lyo Eclipse?
Hi!
I am trying to invoke an OSLC service from DOORS with Lyo Eclipse SDK, and I am having a problem with OAuth dance.
When I am trying to get the response token, I receive a HTTP 401 Unauthorized (Invalid signature for signature method HMAC-SHA1). Here is the GET HTTP being sent:
GET /dwa/oauth-request-token?oauth_consumer_key=ed69becd-cff7-4971-8968-cd4365d31fc6&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1372858221&oauth_nonce=91641252155718&oauth_version=1.0&oauth_signature=tneemmQNiDo8HN+l4gqjkkmwtv8=
I am using DOORS Web Access 1.5.0.0 (Build 214).
Any help or comments are greatly appreciated!
Thanks,
Marianna
Any help or comments are greatly appreciated!
Thanks,
Marianna
Accepted answer
Which Doors version are you using ( not DWA version ) ?
Also, I have a a version of that sample that works with previous versions of doors ( I think 9.4 ) ? I could send you via email if needed.
Also, I have a a version of that sample that works with previous versions of doors ( I think 9.4 ) ? I could send you via email if needed.
Comments
Just checked, I have the version 9.4. Will you please send me the sample that works with this version to marianchik<at>list<dot>ru ? Thank you!
Sorry for a late update, but I changed the code of DoorsOauthSample.java to an older version, and I was able to login. Apparently, DOOR 9.4 does not work with the new version of DOORS sample in Lyo. I changed in function validateTokens by replacing the following code:
HttpPost formPost2 = new HttpPost(location.getValue());
formPost2.addHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
HttpParams params = new BasicHttpParams();
params.setParameter("oauth_token", oauthToken);
params.setParameter("oauth_verifier", oauthverifier);
params.setParameter("authorize", "true");
formPost2.setParams(params);
with this code:
HttpPost formPost2 = new HttpPost(authURL);
formPost2.getParams().setParameter("oauth_token", oauthToken);
formPost2.getParams().setParameter("oauth_verifier", oauthverifier);
formPost2.getParams().setParameter("authorize", "true");
formPost2.addHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");