It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

1 vote
Answer accepted

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 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,097 views 7 0
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you