routes.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2016, ownCloud, Inc.
  5. *
  6. * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
  7. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  8. * @author Lukas Reschke <lukas@statuscode.ch>
  9. * @author Morris Jobke <hey@morrisjobke.de>
  10. * @author Roger Szabo <roger.szabo@web.de>
  11. *
  12. * @license AGPL-3.0
  13. *
  14. * This code is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU Affero General Public License, version 3,
  16. * as published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License, version 3,
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>
  25. *
  26. */
  27. /** @var $this \OCP\Route\IRouter */
  28. $this->create('user_ldap_ajax_clearMappings', 'ajax/clearMappings.php')
  29. ->actionInclude('user_ldap/ajax/clearMappings.php');
  30. $this->create('user_ldap_ajax_deleteConfiguration', 'ajax/deleteConfiguration.php')
  31. ->actionInclude('user_ldap/ajax/deleteConfiguration.php');
  32. $this->create('user_ldap_ajax_getConfiguration', 'ajax/getConfiguration.php')
  33. ->actionInclude('user_ldap/ajax/getConfiguration.php');
  34. $this->create('user_ldap_ajax_getNewServerConfigPrefix', 'ajax/getNewServerConfigPrefix.php')
  35. ->actionInclude('user_ldap/ajax/getNewServerConfigPrefix.php');
  36. $this->create('user_ldap_ajax_setConfiguration', 'ajax/setConfiguration.php')
  37. ->actionInclude('user_ldap/ajax/setConfiguration.php');
  38. $this->create('user_ldap_ajax_testConfiguration', 'ajax/testConfiguration.php')
  39. ->actionInclude('user_ldap/ajax/testConfiguration.php');
  40. $this->create('user_ldap_ajax_wizard', 'ajax/wizard.php')
  41. ->actionInclude('user_ldap/ajax/wizard.php');
  42. $application = new \OCP\AppFramework\App('user_ldap');
  43. $application->registerRoutes($this, [
  44. 'ocs' => [
  45. ['name' => 'ConfigAPI#create', 'url' => '/api/v1/config', 'verb' => 'POST'],
  46. ['name' => 'ConfigAPI#show', 'url' => '/api/v1/config/{configID}', 'verb' => 'GET'],
  47. ['name' => 'ConfigAPI#modify', 'url' => '/api/v1/config/{configID}', 'verb' => 'PUT'],
  48. ['name' => 'ConfigAPI#delete', 'url' => '/api/v1/config/{configID}', 'verb' => 'DELETE'],
  49. ]
  50. ]);
  51. /** @var \OCA\User_LDAP\AppInfo\Application $application */
  52. $application = \OC::$server->query(\OCA\User_LDAP\AppInfo\Application::class);
  53. $application->registerRoutes($this, [
  54. 'routes' => [
  55. ['name' => 'renewPassword#tryRenewPassword', 'url' => '/renewpassword', 'verb' => 'POST'],
  56. ['name' => 'renewPassword#showRenewPasswordForm', 'url' => '/renewpassword/{user}', 'verb' => 'GET'],
  57. ['name' => 'renewPassword#cancel', 'url' => '/renewpassword/cancel', 'verb' => 'GET'],
  58. ['name' => 'renewPassword#showLoginFormInvalidPassword', 'url' => '/renewpassword/invalidlogin/{user}', 'verb' => 'GET'],
  59. ]
  60. ]);