X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Foauthstore.php;h=183164e170a86ae2353d4c3d6266d5a6c1024ebc;hb=1df3eeba861f9f5b7be7fd1ad4298f614a6cbee5;hp=9af05ea2de82f663e2689ceae7bcf724e3e3ad24;hpb=6ce7d0c567b23d3bec035a9c4428399bdfdb896b;p=quix0rs-gnu-social.git diff --git a/lib/oauthstore.php b/lib/oauthstore.php index 9af05ea2de..183164e170 100644 --- a/lib/oauthstore.php +++ b/lib/oauthstore.php @@ -54,16 +54,21 @@ class LaconicaOAuthDataStore extends OAuthDataStore } } + // http://oauth.net/core/1.0/#nonce + // "The Consumer SHALL then generate a Nonce value that is unique for + // all requests with that timestamp." + + // XXX: It's not clear why the token is here + function lookup_nonce($consumer, $token, $nonce, $timestamp) { $n = new Nonce(); $n->consumer_key = $consumer->key; - $n->tok = $token->key; + $n->ts = $timestamp; $n->nonce = $nonce; if ($n->find(true)) { return true; } else { - $n->ts = $timestamp; $n->created = DB_DataObject_Cast::dateTime(); $n->insert(); return false;