diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php index 0f408380e8824..2566e742407e8 100644 --- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php +++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php @@ -72,6 +72,9 @@ class RegistrationContext { /** @var array[] */ private $initialStates = []; + /** @var array[] */ + private $userBackEnds = []; + /** @var ILogger */ private $logger; @@ -174,6 +177,13 @@ public function registerInitialStateProvider(string $class): void { $class ); } + + public function registerUserBackend(string $class): void { + $this->context->registerUserBackend( + $this->appId, + $class + ); + } }; } @@ -260,6 +270,13 @@ public function registerInitialState(string $appId, string $class): void { ]; } + public function registerUserBackEnd(string $appId, string $class): void { + $this->userBackEnds[] = [ + 'appId' => $appId, + 'class' => $class, + ]; + } + /** * @param App[] $apps */ diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index 13181cbe1cb5b..ddf311b0d7622 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -168,4 +168,16 @@ public function registerAlternativeLogin(string $class): void; * @since 21.0.0 */ public function registerInitialStateProvider(string $class): void; + + /** + * Register a user backend + * + * @param string $class the class name of an \OCP\IUserBackend implementation + * @psalm-param class-string<\OCP\IUserBackend> $class the class name of an \OCP\IUserBackend implementation + * + * @return void + * + * @since 21.0.0 + */ + public function registerUserBackend(string $class): void; }