X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNetwork%2FFKOAuth1.php;h=642fab111a1912c205a0318f0e98b8168aa919bd;hb=e27915a819397f391b5c50b5bf15e2475eb084bf;hp=a3dde38d26029b4d00ab57b95376974f74d901c4;hpb=e7ea5dac2464e790142c134c7f3d0f01aab39fce;p=friendica.git diff --git a/src/Network/FKOAuth1.php b/src/Network/FKOAuth1.php index a3dde38d26..642fab111a 100644 --- a/src/Network/FKOAuth1.php +++ b/src/Network/FKOAuth1.php @@ -1,25 +1,40 @@ . + * */ + namespace Friendica\Network; -use Friendica\BaseObject; -use Friendica\App\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); } }