mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
added Application Ecosystem V2 login handler
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
This commit is contained in:
parent
9241a38fc2
commit
ca76ab98bd
1 changed files with 15 additions and 0 deletions
15
lib/base.php
15
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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue