X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2FFKOAuth1.php;h=642fab111a1912c205a0318f0e98b8168aa919bd;hb=e27915a819397f391b5c50b5bf15e2475eb084bf;hp=81c0c1b2917e1ce10d81064fd30ffa8188b5e33e;hpb=96555a7385a73c3830a6c1715e19da5ffd509835;p=friendica.git diff --git a/src/Network/FKOAuth1.php b/src/Network/FKOAuth1.php index 81c0c1b291..642fab111a 100644 --- a/src/Network/FKOAuth1.php +++ b/src/Network/FKOAuth1.php @@ -1,25 +1,40 @@ . + * */ + namespace Friendica\Network; -use Friendica\BaseObject; -use Friendica\Core\Authentication; use Friendica\Core\Logger; -use Friendica\Core\Session; use Friendica\Database\DBA; +use Friendica\DI; use OAuthServer; use OAuthSignatureMethod_HMAC_SHA1; use OAuthSignatureMethod_PLAINTEXT; /** - * @brief OAuth protocol + * OAuth protocol */ class FKOAuth1 extends OAuthServer { /** - * @brief Constructor + * Constructor */ public function __construct() { @@ -37,7 +52,7 @@ class FKOAuth1 extends OAuthServer public function loginUser($uid) { Logger::log("FKOAuth1::loginUser $uid"); - $a = BaseObject::getApp(); + $a = DI::app(); $record = DBA::selectFirst('user', [], ['uid' => $uid, 'blocked' => 0, 'account_expired' => 0, 'account_removed' => 0, 'verified' => 1]); if (!DBA::isResult($record)) { @@ -46,8 +61,6 @@ class FKOAuth1 extends OAuthServer die('This api requires login'); } - /** @var Authentication $authentication */ - $authentication = BaseObject::getClass(Authentication::class); - $authentication->setForUser($a, $record, true); + DI::auth()->setForUser($a, $record, true); } }