2015-10-29 19:27:14 +03:00
|
|
|
<?php
|
|
|
|
/**
|
2016-07-21 17:49:16 +03:00
|
|
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
|
|
|
*
|
2016-05-26 20:56:05 +03:00
|
|
|
* @author Björn Schießle <bjoern@schiessle.org>
|
2017-11-06 17:56:42 +03:00
|
|
|
* @author Joas Schilling <coding@schilljs.com>
|
2019-12-03 21:57:53 +03:00
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
2016-03-01 19:25:15 +03:00
|
|
|
* @author Thomas Müller <thomas.mueller@tmit.eu>
|
2015-10-29 19:27:14 +03:00
|
|
|
*
|
|
|
|
* @license AGPL-3.0
|
|
|
|
*
|
|
|
|
* This code is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3,
|
2019-12-03 21:57:53 +03:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
2015-10-29 19:27:14 +03:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCA\Federation\AppInfo;
|
|
|
|
|
2020-07-13 16:43:42 +03:00
|
|
|
use OCA\DAV\Events\SabrePluginAuthInitEvent;
|
|
|
|
use OCA\Federation\Listener\SabrePluginAuthInitListener;
|
2015-10-29 19:27:14 +03:00
|
|
|
use OCA\Federation\Middleware\AddServerMiddleware;
|
2017-08-02 15:34:51 +03:00
|
|
|
use OCP\AppFramework\App;
|
2020-07-13 16:43:42 +03:00
|
|
|
use OCP\AppFramework\Bootstrap\IBootContext;
|
|
|
|
use OCP\AppFramework\Bootstrap\IBootstrap;
|
|
|
|
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
2015-10-29 19:27:14 +03:00
|
|
|
|
2020-07-13 16:43:42 +03:00
|
|
|
class Application extends App implements IBootstrap {
|
2015-10-29 19:27:14 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param array $urlParams
|
|
|
|
*/
|
2017-08-02 15:34:51 +03:00
|
|
|
public function __construct($urlParams = []) {
|
2015-10-29 19:27:14 +03:00
|
|
|
parent::__construct('federation', $urlParams);
|
|
|
|
}
|
|
|
|
|
2020-07-13 16:43:42 +03:00
|
|
|
public function register(IRegistrationContext $context): void {
|
|
|
|
$context->registerMiddleware(AddServerMiddleware::class);
|
2015-11-10 12:50:59 +03:00
|
|
|
|
2020-07-13 16:43:42 +03:00
|
|
|
$context->registerEventListener(SabrePluginAuthInitEvent::class, SabrePluginAuthInitListener::class);
|
|
|
|
}
|
2015-12-04 14:11:07 +03:00
|
|
|
|
2020-07-13 16:43:42 +03:00
|
|
|
public function boot(IBootContext $context): void {
|
2015-11-23 19:01:53 +03:00
|
|
|
}
|
2015-10-29 19:27:14 +03:00
|
|
|
}
|