]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/oauthstore.php
Update copyright dates in files modified in 2009
[quix0rs-gnu-social.git] / lib / oauthstore.php
index 7ad3be20e2ac318517b5b150e974de7a32633546..f224c6c2213ed3324ad49d3f87567abc4ef988fd 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, 2009, Control Yourself, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -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->timestamp = $timestamp;
             $n->created = DB_DataObject_Cast::dateTime();
             $n->insert();
             return false;