diff options
Diffstat (limited to 'lib/public/Federation/ICloudIdManager.php')
-rw-r--r-- | lib/public/Federation/ICloudIdManager.php | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/lib/public/Federation/ICloudIdManager.php b/lib/public/Federation/ICloudIdManager.php index 52920751739..29e261ab3af 100644 --- a/lib/public/Federation/ICloudIdManager.php +++ b/lib/public/Federation/ICloudIdManager.php @@ -3,35 +3,19 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2017, Robin Appelman <robin@icewind.nl> - * - * @author Joas Schilling <coding@schilljs.com> - * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * 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 - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Federation; +use OCP\AppFramework\Attribute\Consumable; + /** * Interface for resolving federated cloud ids * * @since 12.0.0 */ +#[Consumable(since: '12.0.0')] interface ICloudIdManager { /** * @param string $cloudId @@ -67,9 +51,35 @@ interface ICloudIdManager { * remove scheme/protocol from an url * * @param string $url + * @param bool $httpsOnly * * @return string * @since 28.0.0 + * @since 30.0.0 - Optional parameter $httpsOnly was added + */ + public function removeProtocolFromUrl(string $url, bool $httpsOnly = false): string; + + /** + * @param string $id The remote cloud id + * @param string $user The user id on the remote server + * @param string $remote The base address of the remote server + * @param ?string $displayName The displayname of the remote user + * + * @since 32.0.0 + */ + public function createCloudId(string $id, string $user, string $remote, ?string $displayName = null): ICloudId; + + /** + * @param $resolver The cloud id resolver to register + * + * @since 32.0.0 + */ + public function registerCloudIdResolver(ICloudIdResolver $resolver): void; + + /** + * @param $resolver The cloud id resolver to unregister + * + * @since 32.0.0 */ - public function removeProtocolFromUrl(string $url): string; + public function unregisterCloudIdResolver(ICloudIdResolver $resolver): void; } |