summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorAlexander Piskun <bigcat88@icloud.com>2023-08-01 14:50:59 +0300
committerAndy Scherzinger <info@andy-scherzinger.de>2023-08-11 01:37:01 +0200
commitebf21bed5135d310116ab9ec61b66be2a621922c (patch)
treebb32aef92cbb3e2e4449f551e7a9569eed3307b6 /lib/base.php
parentd46779711cf09c4c902d2057931d046d6b89b840 (diff)
downloadnextcloud-server-ebf21bed5135d310116ab9ec61b66be2a621922c.tar.gz
nextcloud-server-ebf21bed5135d310116ab9ec61b66be2a621922c.zip
added Application Ecosystem V2 login handler
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index ed62494ab30..4a4c7762595 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -1138,6 +1138,9 @@ class OC {
if (OC_User::handleApacheAuth()) {
return true;
}
+ if (self::tryAppEcosystemV2Login($request)) {
+ return true;
+ }
if ($userSession->tryTokenLogin($request)) {
return true;
}
@@ -1175,6 +1178,18 @@ class OC {
}
}
}
+
+ 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;
+ }
+ $appEcosystemV2Service = Server::get(OCA\AppEcosystemV2\Service\AppEcosystemV2Service::class);
+ return $appEcosystemV2Service->validateExAppRequestToNC($request);
+ }
}
OC::init();