开发者

oauth_problem=signature_invalid

开发者 https://www.devze.com 2023-03-11 17:48 出处:网络
I\'m using pecl oauth in php, it workds fine in plain php using localhost, and I was able to get the request token. But when I use it on a framework, it throws exception and gives me

I'm using pecl oauth in php, it workds fine in plain php using localhost, and I was able to get the request token. But when I use it on a framework, it throws exception and gives me oauth_problem=signature_invalid.

this framework is being used on 开发者_运维问答a virtual host. Any idea ?

(details can be found below as my comment)


Two of your three paste bins aren't working for me, but I'm also creating an OAuth provider myself and I ran into a problem with my keys. How are you storing them in the database?

In my case, I was saving the SHA1 keys into BINARY(20) columns by calling the MYSQL function UNHEX() when I inserted them and then calling HEX() when I pulled them out[1]. The problem was that HEX and UNHEX return uppercase values, and when I was generating the SHA1 keys using the sha1() function they were lowercase[2]. Make sure they are the same case, because it will affect the signature.

[1] Storing SHA1 hash values in MySQL
[2] http://us.php.net/sha1

0

精彩评论

暂无评论...
验证码 换一张
取 消