aboutsummaryrefslogtreecommitdiffstats
path: root/include/oauth.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-12-13 15:35:45 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-12-13 15:35:45 -0800
commitbb0e4044bf08bbac9d73a3e3b75d74c33dcacd7f (patch)
tree1c6292b26b08bb86ef36cc258cd617197f5844a8 /include/oauth.php
parent395268da22bf5ec773de7fdc42a338a9cbe87d40 (diff)
downloadvolse-hubzilla-bb0e4044bf08bbac9d73a3e3b75d74c33dcacd7f.tar.gz
volse-hubzilla-bb0e4044bf08bbac9d73a3e3b75d74c33dcacd7f.tar.bz2
volse-hubzilla-bb0e4044bf08bbac9d73a3e3b75d74c33dcacd7f.zip
remove the unqualified "OAuth" namespace from the project. We need to reference either OAuth1 or OAuth2.
Diffstat (limited to 'include/oauth.php')
-rw-r--r--include/oauth.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/oauth.php b/include/oauth.php
index 4e5e4ecf8..f3d144158 100644
--- a/include/oauth.php
+++ b/include/oauth.php
@@ -13,7 +13,7 @@ require_once("library/OAuth1.php");
//require_once("library/oauth2-php/lib/OAuth2.inc");
-class ZotOAuthDataStore extends OAuthDataStore {
+class ZotOAuth1DataStore extends OAuth1DataStore {
function gen_token(){
return md5(base64_encode(pack('N6', mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), uniqid())));
@@ -28,7 +28,7 @@ class ZotOAuthDataStore extends OAuthDataStore {
if($r) {
get_app()->set_oauth_key($consumer_key);
- return new OAuthConsumer($r[0]['client_id'],$r[0]['pw'],$r[0]['redirect_uri']);
+ return new OAuth1Consumer($r[0]['client_id'],$r[0]['pw'],$r[0]['redirect_uri']);
}
return null;
}
@@ -44,7 +44,7 @@ class ZotOAuthDataStore extends OAuthDataStore {
);
if (count($r)){
- $ot=new OAuthToken($r[0]['id'],$r[0]['secret']);
+ $ot=new OAuth1Token($r[0]['id'],$r[0]['secret']);
$ot->scope=$r[0]['scope'];
$ot->expires = $r[0]['expires'];
$ot->uid = $r[0]['uid'];
@@ -62,7 +62,7 @@ class ZotOAuthDataStore extends OAuthDataStore {
);
if (count($r))
- return new OAuthToken($r[0]['id'],$r[0]['secret']);
+ return new OAuth1Token($r[0]['id'],$r[0]['secret']);
return null;
}
@@ -88,7 +88,7 @@ class ZotOAuthDataStore extends OAuthDataStore {
if(! $r)
return null;
- return new OAuthToken($key,$sec);
+ return new OAuth1Token($key,$sec);
}
function new_access_token($token, $consumer, $verifier = null) {
@@ -119,7 +119,7 @@ class ZotOAuthDataStore extends OAuthDataStore {
intval($uverifier));
if ($r)
- $ret = new OAuthToken($key,$sec);
+ $ret = new OAuth1Token($key,$sec);
}
@@ -138,12 +138,12 @@ class ZotOAuthDataStore extends OAuthDataStore {
}
}
-class ZotOAuth1 extends OAuthServer {
+class ZotOAuth1 extends OAuth1Server {
function __construct() {
- parent::__construct(new ZotOAuthDataStore());
- $this->add_signature_method(new OAuthSignatureMethod_PLAINTEXT());
- $this->add_signature_method(new OAuthSignatureMethod_HMAC_SHA1());
+ parent::__construct(new ZotOAuth1DataStore());
+ $this->add_signature_method(new OAuth1SignatureMethod_PLAINTEXT());
+ $this->add_signature_method(new OAuth1SignatureMethod_HMAC_SHA1());
}
function loginUser($uid){