Jira Oauth:401在PHP中未经授权oauth_problem =" signature_invalid"

时间:2015-05-27 07:52:31

标签: php oauth jira jira-rest-api

我正在开发一些使用Oauth登录Jira的工具。我正在使用示例教程,即https://bitbucket.org/atlassian_tutorial/atlassian-oauth-examples/src/d625161454d1ca97b4515c6147b093fac9a68f7e/php/?at=default

作为回应显示

[response] HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
WWW-Authenticate: OAuth realm="http%3A%2F%2F10.36.4.32", OAuth realm="http%3A%2F%2F10.36.4.32", oauth_signature="L0%2Be6nyQw%2BUcqJLffITO5%2F7WyXt20vQYj5kMTrKpzjzLJL96Jzn1TJjriVRArxUuK%2FEUCwWzxnCuD2cLhc5cWUT1l4KK%2BDx2vNeTGi58otw8g6ehS0bHt2ny58%2Fze7yWNatYRhgQtbbzME7tWZWXlA%2F5LLVBzXuVIHaxQS0asw0%3D", oauth_signature_base_string="POST%26http%253A%252F%252F10.36.4.32%252Fplugins%252Fservlet%252Foauth%252Frequest-token%26oauth_callback%253Dhttp%25253A%25252F%25252Fabu-dev-mix03.ubisoft.org%25252F~ali.ejaz%25252FTaskManagement%25252Foauth%25252Fphp%25252Fweb%25252Findex.php%25252Fcallback%2526oauth_consumer_key%253Dubisoft.org%2526oauth_nonce%253Dc3ddcd31e18c4f53f5ae3ac2079ad1d51bd0cf68%2526oauth_signature_method%253DRSA-SHA1%2526oauth_timestamp%253D1432712645%2526oauth_version%253D1.0", oauth_problem="signature_invalid", oauth_signature_method="RSA-SHA1"
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Content-Length: 758
Date: Wed, 27 May 2015 07:44:05 GMT

oauth_signature=L0%2Be6nyQw%2BUcqJLffITO5%2F7WyXt20vQYj5kMTrKpzjzLJL96Jzn1TJjriVRArxUuK%2FEUCwWzxnCuD2cLhc5cWUT1l4KK%2BDx2vNeTGi58otw8g6ehS0bHt2ny58%2Fze7yWNatYRhgQtbbzME7tWZWXlA%2F5LLVBzXuVIHaxQS0asw0%3D&oauth_signature_base_string=POST%26http%253A%252F%252F10.36.4.32%252Fplugins%252Fservlet%252Foauth%252Frequest-token%26oauth_callback%253Dhttp%25253A%25252F%25252Fabu-dev-mix03.ubisoft.org%25252F~ali.ejaz%25252FTaskManagement%25252Foauth%25252Fphp%25252Fweb%25252Findex.php%25252Fcallback%2526oauth_consumer_key%253Dubisoft.org%2526oauth_nonce%253Dc3ddcd31e18c4f53f5ae3ac2079ad1d51bd0cf68%2526oauth_signature_method%253DRSA-SHA1%2526oauth_timestamp%253D1432712645%2526oauth_version%253D1.0&oauth_problem=signature_invalid&oauth_signature_method=RSA-SHA1

我的本地计算机上有jira实例,但Oauth代码位于本地服务器上。

1 个答案:

答案 0 :(得分:0)

我在Jira和Application中提供了不同的公钥。纠正这个问题后,它运行得很好。