diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-02 22:32:50 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-02 22:32:50 -0400 |
commit | b93e398674b375a3b14718fc6dd2a815aad9b387 (patch) | |
tree | 7c2a8097e1c90a87cc8207b5fe08a064f4fa3ae8 /include/oauth.php | |
parent | b70c6809648bb3c78e5e26f9293727b3a7aa4025 (diff) | |
parent | f9075e2a2feca0f37fdf568be6e6e53460aa9034 (diff) | |
download | volse-hubzilla-b93e398674b375a3b14718fc6dd2a815aad9b387.tar.gz volse-hubzilla-b93e398674b375a3b14718fc6dd2a815aad9b387.tar.bz2 volse-hubzilla-b93e398674b375a3b14718fc6dd2a815aad9b387.zip |
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'include/oauth.php')
-rw-r--r-- | include/oauth.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/oauth.php b/include/oauth.php index ec41a5dd2..984e0e6c6 100644 --- a/include/oauth.php +++ b/include/oauth.php @@ -37,7 +37,7 @@ class ZotOAuth1DataStore extends OAuth1DataStore { logger(__function__.":".$consumer.", ". $token_type.", ".$token, LOGGER_DEBUG); - $r = q("SELECT id, secret, scope, expires, uid FROM tokens WHERE client_id = '%s' AND scope = '%s' AND id = '%s'", + $r = q("SELECT id, secret, auth_scope, expires, uid FROM tokens WHERE client_id = '%s' AND auth_scope = '%s' AND id = '%s'", dbesc($consumer->key), dbesc($token_type), dbesc($token) @@ -45,7 +45,7 @@ class ZotOAuth1DataStore extends OAuth1DataStore { if (count($r)){ $ot=new OAuth1Token($r[0]['id'],$r[0]['secret']); - $ot->scope=$r[0]['scope']; + $ot->scope=$r[0]['auth_scope']; $ot->expires = $r[0]['expires']; $ot->uid = $r[0]['uid']; return $ot; @@ -79,7 +79,7 @@ class ZotOAuth1DataStore extends OAuth1DataStore { $k = $consumer; } - $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires) VALUES ('%s','%s','%s','%s', %d)", + $r = q("INSERT INTO tokens (id, secret, client_id, auth_scope, expires) VALUES ('%s','%s','%s','%s', %d)", dbesc($key), dbesc($sec), dbesc($k), @@ -110,7 +110,7 @@ class ZotOAuth1DataStore extends OAuth1DataStore { $key = $this->gen_token(); $sec = $this->gen_token(); - $r = q("INSERT INTO tokens (id, secret, client_id, scope, expires, uid) VALUES ('%s','%s','%s','%s', %d, %d)", + $r = q("INSERT INTO tokens (id, secret, client_id, auth_scope, expires, uid) VALUES ('%s','%s','%s','%s', %d, %d)", dbesc($key), dbesc($sec), dbesc($consumer->key), @@ -249,7 +249,7 @@ class FKOAuth2 extends OAuth2 { protected function getAuthCode($code) { - $r = q("SELECT id, client_id, redirect_uri, expires, scope FROM auth_codes WHERE id = '%s'", + $r = q("SELECT id, client_id, redirect_uri, expires, auth_scope FROM auth_codes WHERE id = '%s'", dbesc($code)); if (count($r)) @@ -259,7 +259,7 @@ class FKOAuth2 extends OAuth2 { protected function setAuthCode($code, $client_id, $redirect_uri, $expires, $scope = NULL) { $r = q("INSERT INTO auth_codes - (id, client_id, redirect_uri, expires, scope) VALUES + (id, client_id, redirect_uri, expires, auth_scope) VALUES ('%s', '%s', '%s', %d, '%s')", dbesc($code), dbesc($client_id), |