EasyRest+JIRA+OAuth

bobbylobby August 11, 2014

Hello Everybody! I have a little problem whith JIRA and OAuth.

I try to get Token by:

ClientRequest request = new ClientRequest(TOKEN_LOCATION);
    request.accept(CONTENT_TYPE)
    .formParameter("oauth_consumer_key", OAUTH_CONSUMER_KEY)
    .formParameter("oauth_signature_method", OAUTH_SIGNATURE_METOD)
    .formParameter("oauth_nonce", OAUTH_NONCE)
    .formParameter("oauth_timestamp", getTimeStamp())
    .formParameter("oauth_signature", OAUTH_SIGNATURE);
    ClientResponse<String> response = request.post(String.class);

And have some Exeption:
net.oauth.OAuthException: java.security.SignatureException: Signature length not correct: got 318 but was expecting 64

Signature really right!
Any answers?

1 answer

0 votes
Jose Raupp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2015

Hey Serj,

 

By performing some research on this matter I found out a very good answer from Martin Cassidy, maybe you'd like to have a read:

https://answers.atlassian.com/questions/263719/using-oauth-and-the-jira-java-rest-client

 

Suggest an answer

Log in or Sign up to answer