oauth SignatureException: Signature length not correct

Hi, I trying to make OAuth authorization in my PHP app, but I getting following error

JIRA throws an exception when trying to request token 

request headers are:

[

  [Connection] => close

  [Accept-Encoding] => gzip, deflate  

  [User-Agent] => Zend\Http\Client

  [Content-Type] => application/x-www-form-urlencoded

  [Authorization] => OAuth realm="",oauth_consumer_key="key",oauth_nonce="4279f234a0fd4039d7d0309bb1995698",oauth_timestamp="1472486709",oauth_signature_method="RSA-SHA1",oauth_version="1.0",oauth_callback="oob",oauth_signature="%15%AC%BF1y%95%A6r%2F%D9%00%8E%5D%A8%87j%D2%D1%C6%27%0C%0Eg%8D%01v%22B%E1%EF%C8%60%CD%21%F0~%94%C5%8D%FAG%01%FA%EA%3A%24%D5%E7w9%EE%5C%24J%C4P%C0%9E%047%D5%97B%91%15%95%0CB%A6%D5bi~%15%AC%F1%B4t%93%A2%A11%0D%91%9E%E65D%BF%1F%D7%2B%EEV%403u%1E%C3%86%0Ap%EC%18%3A%92A%E6%EDA%9C%87%D5%DFT%E4q%FEl%95S%F4W%14K%A1%19%88"

]

 

response http code 500

and text of exception is:

net.oauth.OAuthException: java.security.SignatureException: Signature length not correct: got 15 but was expecting 128


could somone tell what is wrong here?


thx.

1 answer

1 accepted

This widget could not be displayed.

You should encode your signature as Base64, your signature is in bytes and it stops at the %00 (0 byte, is string end)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

162 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you