aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federation/appinfo/routes.php
blob: 7ab9f84edd5b87b85fa58ab0e20a1614575d8662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php

/**
 * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
 * SPDX-License-Identifier: AGPL-3.0-only
 */
return [
	'routes' => [
		[
			'name' => 'Settings#addServer',
			'url' => '/trusted-servers',
			'verb' => 'POST'
		],
		[
			'name' => 'Settings#removeServer',
			'url' => '/trusted-servers/{id}',
			'verb' => 'DELETE'
		],
	],
	'ocs' => [
		// old endpoints, only used by Nextcloud and ownCloud
		[
			'name' => 'OCSAuthAPI#getSharedSecretLegacy',
			'url' => '/api/v1/shared-secret',
			'verb' => 'GET',
		],
		[
			'name' => 'OCSAuthAPI#requestSharedSecretLegacy',
			'url' => '/api/v1/request-shared-secret',
			'verb' => 'POST',
		],
		// new endpoints, published as public api
		[
			'name' => 'OCSAuthAPI#getSharedSecret',
			'root' => '/cloud',
			'url' => '/shared-secret',
			'verb' => 'GET',
		],
		[
			'name' => 'OCSAuthAPI#requestSharedSecret',
			'root' => '/cloud',
			'url' => '/shared-secret',
			'verb' => 'POST',
		],
	],
];