Application.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCA\Federation\AppInfo;
  8. use OCA\DAV\Events\SabrePluginAuthInitEvent;
  9. use OCA\Federation\Listener\SabrePluginAuthInitListener;
  10. use OCA\Federation\Middleware\AddServerMiddleware;
  11. use OCP\AppFramework\App;
  12. use OCP\AppFramework\Bootstrap\IBootContext;
  13. use OCP\AppFramework\Bootstrap\IBootstrap;
  14. use OCP\AppFramework\Bootstrap\IRegistrationContext;
  15. class Application extends App implements IBootstrap {
  16. /**
  17. * @param array $urlParams
  18. */
  19. public function __construct($urlParams = []) {
  20. parent::__construct('federation', $urlParams);
  21. }
  22. public function register(IRegistrationContext $context): void {
  23. $context->registerMiddleware(AddServerMiddleware::class);
  24. $context->registerEventListener(SabrePluginAuthInitEvent::class, SabrePluginAuthInitListener::class);
  25. }
  26. public function boot(IBootContext $context): void {
  27. }
  28. }