routes.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 Joas Schilling <coding@schilljs.com>
  9. * @author Lukas Reschke <lukas@statuscode.ch>
  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. $this->create('user_ldap_ajax_clearMappings', 'apps/user_ldap/ajax/clearMappings.php')
  28. ->actionInclude('user_ldap/ajax/clearMappings.php');
  29. $this->create('user_ldap_ajax_deleteConfiguration', 'apps/user_ldap/ajax/deleteConfiguration.php')
  30. ->actionInclude('user_ldap/ajax/deleteConfiguration.php');
  31. $this->create('user_ldap_ajax_getConfiguration', 'apps/user_ldap/ajax/getConfiguration.php')
  32. ->actionInclude('user_ldap/ajax/getConfiguration.php');
  33. $this->create('user_ldap_ajax_getNewServerConfigPrefix', 'apps/user_ldap/ajax/getNewServerConfigPrefix.php')
  34. ->actionInclude('user_ldap/ajax/getNewServerConfigPrefix.php');
  35. $this->create('user_ldap_ajax_setConfiguration', 'apps/user_ldap/ajax/setConfiguration.php')
  36. ->actionInclude('user_ldap/ajax/setConfiguration.php');
  37. $this->create('user_ldap_ajax_testConfiguration', 'apps/user_ldap/ajax/testConfiguration.php')
  38. ->actionInclude('user_ldap/ajax/testConfiguration.php');
  39. $this->create('user_ldap_ajax_wizard', 'apps/user_ldap/ajax/wizard.php')
  40. ->actionInclude('user_ldap/ajax/wizard.php');
  41. $application = new \OCP\AppFramework\App('user_ldap');
  42. $application->registerRoutes($this, [
  43. 'ocs' => [
  44. ['name' => 'ConfigAPI#create', 'url' => '/api/v1/config', 'verb' => 'POST'],
  45. ['name' => 'ConfigAPI#show', 'url' => '/api/v1/config/{configID}', 'verb' => 'GET'],
  46. ['name' => 'ConfigAPI#modify', 'url' => '/api/v1/config/{configID}', 'verb' => 'PUT'],
  47. ['name' => 'ConfigAPI#delete', 'url' => '/api/v1/config/{configID}', 'verb' => 'DELETE'],
  48. ]
  49. ]);
  50. /** @var \OCA\User_LDAP\AppInfo\Application $application */
  51. $application = \OC::$server->query(\OCA\User_LDAP\AppInfo\Application::class);
  52. $application->registerRoutes($this, [
  53. 'routes' => [
  54. ['name' => 'renewPassword#tryRenewPassword', 'url' => '/renewpassword', 'verb' => 'POST'],
  55. ['name' => 'renewPassword#showRenewPasswordForm', 'url' => '/renewpassword/{user}', 'verb' => 'GET'],
  56. ['name' => 'renewPassword#cancel', 'url' => '/renewpassword/cancel', 'verb' => 'GET'],
  57. ['name' => 'renewPassword#showLoginFormInvalidPassword', 'url' => '/renewpassword/invalidlogin/{user}', 'verb' => 'GET'],
  58. ]
  59. ]);