]> source.dussan.org Git - nextcloud-server.git/commitdiff
new name of AppEcosystem is AppAPI 40295/head
authorAlexander Piskun <bigcat88@icloud.com>
Wed, 6 Sep 2023 13:53:53 +0000 (16:53 +0300)
committerAlexander Piskun <bigcat88@icloud.com>
Wed, 6 Sep 2023 13:53:53 +0000 (16:53 +0300)
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 7153e481edab7461a9ccd401ca7d0d8ac015467e..d96f91ddcd4ddba22e7d20a72fa3ac031fd7c5f1 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 cb7409489a827a80fbeb6b3333a97d86cb565493..f0198ee745ec48ec0892e403c35580c5f82f7216 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>
                <LessSpecificReturnStatement errorLevel="error"/>