routes.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. return [
  8. 'routes' => [
  9. [
  10. 'name' => 'Settings#addServer',
  11. 'url' => '/trusted-servers',
  12. 'verb' => 'POST'
  13. ],
  14. [
  15. 'name' => 'Settings#removeServer',
  16. 'url' => '/trusted-servers/{id}',
  17. 'verb' => 'DELETE'
  18. ],
  19. ],
  20. 'ocs' => [
  21. // old endpoints, only used by Nextcloud and ownCloud
  22. [
  23. 'name' => 'OCSAuthAPI#getSharedSecretLegacy',
  24. 'url' => '/api/v1/shared-secret',
  25. 'verb' => 'GET',
  26. ],
  27. [
  28. 'name' => 'OCSAuthAPI#requestSharedSecretLegacy',
  29. 'url' => '/api/v1/request-shared-secret',
  30. 'verb' => 'POST',
  31. ],
  32. // new endpoints, published as public api
  33. [
  34. 'name' => 'OCSAuthAPI#getSharedSecret',
  35. 'root' => '/cloud',
  36. 'url' => '/shared-secret',
  37. 'verb' => 'GET',
  38. ],
  39. [
  40. 'name' => 'OCSAuthAPI#requestSharedSecret',
  41. 'root' => '/cloud',
  42. 'url' => '/shared-secret',
  43. 'verb' => 'POST',
  44. ],
  45. ],
  46. ];