]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/OAuth/Token.php
Merge pull request #12445 from MrPetovan/bug/12382-tag-attachment
[friendica.git] / src / Module / OAuth / Token.php
index efd4000f676541bbeec65bf160bbad16e5382eef..1da8df18d5a41c64137a4661edce2a2362fb68a2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -28,6 +28,7 @@ use Friendica\DI;
 use Friendica\Module\BaseApi;
 use Friendica\Security\OAuth;
 use Friendica\Util\DateTimeFormat;
+use Psr\Http\Message\ResponseInterface;
 
 /**
  * @see https://docs.joinmastodon.org/spec/oauth/
@@ -35,6 +36,11 @@ use Friendica\Util\DateTimeFormat;
  */
 class Token extends BaseApi
 {
+       public function run(array $request = [], bool $scopecheck = true): ResponseInterface
+       {
+               return parent::run($request, false);
+       }
+
        protected function post(array $request = [])
        {
                $request = $this->getRequest([
@@ -82,7 +88,7 @@ class Token extends BaseApi
 
                        $token = DBA::selectFirst('application-view', ['access_token', 'created_at'], $condition);
                        if (!DBA::isResult($token)) {
-                               Logger::warning('Token not found or outdated', $condition);
+                               Logger::notice('Token not found or outdated', $condition);
                                DI::mstdnError()->Unauthorized();
                        }
                } else {