routes.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Björn Schießle <bjoern@schiessle.org>
  6. * @author Julius Härtl <jus@bitgrid.net>
  7. * @author Roeland Jago Douma <roeland@famdouma.nl>
  8. *
  9. * @license AGPL-3.0
  10. *
  11. * This code is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License, version 3,
  13. * as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License, version 3,
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>
  22. *
  23. */
  24. return [
  25. 'routes' => [
  26. [
  27. 'name' => 'Settings#addServer',
  28. 'url' => '/trusted-servers',
  29. 'verb' => 'POST'
  30. ],
  31. [
  32. 'name' => 'Settings#removeServer',
  33. 'url' => '/trusted-servers/{id}',
  34. 'verb' => 'DELETE'
  35. ],
  36. ],
  37. 'ocs' => [
  38. // old endpoints, only used by Nextcloud and ownCloud
  39. [
  40. 'name' => 'OCSAuthAPI#getSharedSecretLegacy',
  41. 'url' => '/api/v1/shared-secret',
  42. 'verb' => 'GET',
  43. ],
  44. [
  45. 'name' => 'OCSAuthAPI#requestSharedSecretLegacy',
  46. 'url' => '/api/v1/request-shared-secret',
  47. 'verb' => 'POST',
  48. ],
  49. // new endpoints, published as public api
  50. [
  51. 'name' => 'OCSAuthAPI#getSharedSecret',
  52. 'root' => '/cloud',
  53. 'url' => '/shared-secret',
  54. 'verb' => 'GET',
  55. ],
  56. [
  57. 'name' => 'OCSAuthAPI#requestSharedSecret',
  58. 'root' => '/cloud',
  59. 'url' => '/shared-secret',
  60. 'verb' => 'POST',
  61. ],
  62. ],
  63. ];