diff --git a/build/stubs/app_ecosystem_v2.php b/build/stubs/app_ecosystem_v2.php
new file mode 100644
index 0000000000000..d2b07c9c61628
--- /dev/null
+++ b/build/stubs/app_ecosystem_v2.php
@@ -0,0 +1,15 @@
+tryTokenLogin($request)) {
return true;
}
@@ -1174,6 +1177,22 @@ protected static function handleAuthHeaders(): void {
}
}
}
+
+ protected static function tryAppEcosystemV2Login(OCP\IRequest $request): bool {
+ $appManager = Server::get(OCP\App\IAppManager::class);
+ if (!$request->getHeader('AE-SIGNATURE')) {
+ return false;
+ }
+ if (!$appManager->isInstalled('app_ecosystem_v2')) {
+ return false;
+ }
+ try {
+ $appEcosystemV2Service = Server::get(OCA\AppEcosystemV2\Service\AppEcosystemV2Service::class);
+ return $appEcosystemV2Service->validateExAppRequestToNC($request);
+ } catch (\Psr\Container\NotFoundExceptionInterface|\Psr\Container\ContainerExceptionInterface $e) {
+ return false;
+ }
+ }
}
OC::init();
diff --git a/psalm.xml b/psalm.xml
index 87cecf3e2d294..cb7409489a827 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -81,6 +81,7 @@
+