From: Hypolite Petovan Date: Wed, 31 Jan 2018 04:29:05 +0000 (-0500) Subject: Remove require calls to library/OAuth1 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=13849299f98157f1c509667cfcf461af31af4008;p=friendica.git Remove require calls to library/OAuth1 --- diff --git a/src/Network/FKOAuth1.php b/src/Network/FKOAuth1.php index 49483fe272..5efa5f2432 100644 --- a/src/Network/FKOAuth1.php +++ b/src/Network/FKOAuth1.php @@ -1,10 +1,9 @@ * @@ -9,20 +9,18 @@ namespace Friendica\Network; -use Friendica\App; use Friendica\Core\Config; -use Friendica\Core\System; use Friendica\Database\DBM; use dba; +use OAuthConsumer; use OAuthDataStore; +use OAuthToken; define('REQUEST_TOKEN_DURATION', 300); define('ACCESS_TOKEN_DURATION', 31536000); require_once 'include/dba.php'; -require_once "library/OAuth1.php"; - /** * @brief OAuthDataStore class */ @@ -48,7 +46,7 @@ class FKOAuthDataStore extends OAuthDataStore $r = dba::inArray($s); if (DBM::is_result($r)) { - return new \OAuthConsumer($r[0]['client_id'], $r[0]['pw'], $r[0]['redirect_uri']); + return new OAuthConsumer($r[0]['client_id'], $r[0]['pw'], $r[0]['redirect_uri']); } return null; @@ -68,7 +66,7 @@ class FKOAuthDataStore extends OAuthDataStore $r = dba::inArray($s); if (DBM::is_result($r)) { - $ot = new \OAuthToken($r[0]['id'], $r[0]['secret']); + $ot = new OAuthToken($r[0]['id'], $r[0]['secret']); $ot->scope = $r[0]['scope']; $ot->expires = $r[0]['expires']; $ot->uid = $r[0]['uid']; @@ -89,7 +87,7 @@ class FKOAuthDataStore extends OAuthDataStore { $token = dba::selectFirst('tokens', ['id', 'secret'], ['client_id' => $consumer->key, 'id' => $nonce, 'expires' => $timestamp]); if (DBM::is_result($token)) { - return new \OAuthToken($token['id'], $token['secret']); + return new OAuthToken($token['id'], $token['secret']); } return null; @@ -126,7 +124,7 @@ class FKOAuthDataStore extends OAuthDataStore return null; } - return new \OAuthToken($key, $sec); + return new OAuthToken($key, $sec); } /** @@ -165,7 +163,7 @@ class FKOAuthDataStore extends OAuthDataStore ); if ($r) { - $ret = new \OAuthToken($key, $sec); + $ret = new OAuthToken($key, $sec); } }