]> source.dussan.org Git - nextcloud-server.git/commitdiff
new name of AppEcosystem is AppAPI 40315/head
authorAlexander Piskun <bigcat88@icloud.com>
Wed, 6 Sep 2023 13:53:53 +0000 (16:53 +0300)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 7 Sep 2023 05:32:20 +0000 (05:32 +0000)
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
build/stubs/app_api.php [new file with mode: 0644]
build/stubs/app_ecosystem_v2.php [deleted file]
lib/base.php
psalm.xml

diff --git a/build/stubs/app_api.php b/build/stubs/app_api.php
new file mode 100644 (file)
index 0000000..1ab6349
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+
+namespace OCA\AppAPI\Service;
+
+use OCP\IRequest;
+
+class AppAPIService {
+       /**
+        * @param IRequest $request
+        * @param bool $isDav
+        *
+        * @return bool
+        */
+       public function validateExAppRequestToNC(IRequest $request, bool $isDav = false): bool {}
+}
diff --git a/build/stubs/app_ecosystem_v2.php b/build/stubs/app_ecosystem_v2.php
deleted file mode 100644 (file)
index d2b07c9..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-namespace OCA\AppEcosystemV2\Service;
-
-use OCP\IRequest;
-
-class AppEcosystemV2Service {
-       /**
-        * @param IRequest $request
-        * @param bool $isDav
-        *
-        * @return bool
-        */
-       public function validateExAppRequestToNC(IRequest $request, bool $isDav = false): bool {}
-}
index e201ca29dcf9148e2ab3deb09bac9568b79fb4f9..d94671327f281352a692e7e1c81e228c82001695 100644 (file)
@@ -1138,7 +1138,7 @@ class OC {
                if (OC_User::handleApacheAuth()) {
                        return true;
                }
-               if (self::tryAppEcosystemV2Login($request)) {
+               if (self::tryAppAPILogin($request)) {
                        return true;
                }
                if ($userSession->tryTokenLogin($request)) {
@@ -1179,17 +1179,17 @@ class OC {
                }
        }
 
-       protected static function tryAppEcosystemV2Login(OCP\IRequest $request): bool {
+       protected static function tryAppAPILogin(OCP\IRequest $request): bool {
                $appManager = Server::get(OCP\App\IAppManager::class);
-               if (!$request->getHeader('AE-SIGNATURE')) {
+               if (!$request->getHeader('AUTHORIZATION-APP-API')) {
                        return false;
                }
-               if (!$appManager->isInstalled('app_ecosystem_v2')) {
+               if (!$appManager->isInstalled('app_api')) {
                        return false;
                }
                try {
-                       $appEcosystemV2Service = Server::get(OCA\AppEcosystemV2\Service\AppEcosystemV2Service::class);
-                       return $appEcosystemV2Service->validateExAppRequestToNC($request);
+                       $appAPIService = Server::get(OCA\AppAPI\Service\AppAPIService::class);
+                       return $appAPIService->validateExAppRequestToNC($request);
                } catch (\Psr\Container\NotFoundExceptionInterface|\Psr\Container\ContainerExceptionInterface $e) {
                        return false;
                }
index 52eb9841aec4362bcd0a1122478027b8ef721da7..573879adaa80a7ccb9ce4059d3d6487095bd9fdb 100644 (file)
--- a/psalm.xml
+++ b/psalm.xml
@@ -81,7 +81,7 @@
                <file name="build/stubs/zip.php"/>
                <file name="build/stubs/psr_container.php"/>
                <file name="3rdparty/sabre/uri/lib/functions.php" />
-               <file name="build/stubs/app_ecosystem_v2.php" />
+               <file name="build/stubs/app_api.php" />
        </stubs>
        <issueHandlers>
                <UndefinedClass>