]> git.mxchange.org Git - friendica.git/blobdiff - library/OAuth1.php
Lockfile for onepoll, removing old smarty3 cache files.
[friendica.git] / library / OAuth1.php
index 604945265f6f569c9dc3b7fdf24858c59762bfe2..53b905e7714a5cbdc3d8effc40157d554958ddb5 100644 (file)
@@ -3,8 +3,10 @@
 
 /* Generic exception class
  */
-class OAuthException extends Exception {
-  // pass
+if (!class_exists('OAuthException')) {
+       class OAuthException extends Exception {
+               // pass
+       }
 }
 
 class OAuthConsumer {
@@ -27,6 +29,10 @@ class OAuthToken {
   public $key;
   public $secret;
 
+  public $expires;
+  public $scope;
+  public $uid;
+
   /**
    * key = the token
    * secret = the token secret
@@ -285,7 +291,7 @@ class OAuthRequest {
       }
 
     }
-    // fix for friendika redirect system
+    // fix for friendica redirect system
     
     $http_url =  substr($http_url, 0, strpos($http_url,$parameters['q'])+strlen($parameters['q']));
     unset( $parameters['q'] );
@@ -552,6 +558,7 @@ class OAuthServer {
   public function verify_request(&$request) {
     $this->get_version($request);
     $consumer = $this->get_consumer($request);
+    //echo __file__.__line__.__function__."<pre>"; var_dump($consumer); die();
     $token = $this->get_token($request, $consumer, "access");
     $this->check_signature($request, $consumer, $token);
     return array($consumer, $token);