|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-06-11 11:18 UTC] z at orbus dot fr
Description: ------------ As the OAuth RFC says, "The nonce value MUST be unique across all requests with the same timestamp, client credentials, and token combinations." (section 3.3). But in PECL OAuth client, when you make calls to fetch method with a different timestamp (obviously, by waiting some seconds between calls), the nonce doesn't change and triggers a server error (when the server respects the RFC). Reproduce code: --------------- // (snip) Oauth dance $oauth->fetch($url); sleep(2); $oauth->fetch($url2); // -> triggers server error "invalid nonce" Expected result: ---------------- Oauth should send a different nonce for each fetch call. Actual result: -------------- Always sends the same nonce. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Mar 15 08:00:01 2026 UTC |
I *don't* set my own nonce. The script: $conskey = 'trololo'; $conssec = 'trololosecret'; $oauth = new OAuth($conskey, $conssec); $oauth->enableDebug(); $oauth->disableSSLChecks(); $oauth->setToken('toto', '1234'); $joe = $oauth->fetch('https://test.orbus/api/v1/user/get.json?username=joe'); $jack = $oauth->fetch('https://test.orbus/api/v1/user/get.json?username=jack');