routes.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. use OCA\User_LDAP\AppInfo\Application;
  4. use OCP\AppFramework\App;
  5. /**
  6. * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
  7. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  8. * SPDX-License-Identifier: AGPL-3.0-only
  9. */
  10. $this->create('user_ldap_ajax_clearMappings', 'apps/user_ldap/ajax/clearMappings.php')
  11. ->actionInclude('user_ldap/ajax/clearMappings.php');
  12. $this->create('user_ldap_ajax_deleteConfiguration', 'apps/user_ldap/ajax/deleteConfiguration.php')
  13. ->actionInclude('user_ldap/ajax/deleteConfiguration.php');
  14. $this->create('user_ldap_ajax_getConfiguration', 'apps/user_ldap/ajax/getConfiguration.php')
  15. ->actionInclude('user_ldap/ajax/getConfiguration.php');
  16. $this->create('user_ldap_ajax_getNewServerConfigPrefix', 'apps/user_ldap/ajax/getNewServerConfigPrefix.php')
  17. ->actionInclude('user_ldap/ajax/getNewServerConfigPrefix.php');
  18. $this->create('user_ldap_ajax_setConfiguration', 'apps/user_ldap/ajax/setConfiguration.php')
  19. ->actionInclude('user_ldap/ajax/setConfiguration.php');
  20. $this->create('user_ldap_ajax_testConfiguration', 'apps/user_ldap/ajax/testConfiguration.php')
  21. ->actionInclude('user_ldap/ajax/testConfiguration.php');
  22. $this->create('user_ldap_ajax_wizard', 'apps/user_ldap/ajax/wizard.php')
  23. ->actionInclude('user_ldap/ajax/wizard.php');
  24. $application = new App('user_ldap');
  25. $application->registerRoutes($this, [
  26. 'ocs' => [
  27. ['name' => 'ConfigAPI#create', 'url' => '/api/v1/config', 'verb' => 'POST'],
  28. ['name' => 'ConfigAPI#show', 'url' => '/api/v1/config/{configID}', 'verb' => 'GET'],
  29. ['name' => 'ConfigAPI#modify', 'url' => '/api/v1/config/{configID}', 'verb' => 'PUT'],
  30. ['name' => 'ConfigAPI#delete', 'url' => '/api/v1/config/{configID}', 'verb' => 'DELETE'],
  31. ]
  32. ]);
  33. /** @var Application $application */
  34. $application = \OC::$server->query(Application::class);
  35. $application->registerRoutes($this, [
  36. 'routes' => [
  37. ['name' => 'renewPassword#tryRenewPassword', 'url' => '/renewpassword', 'verb' => 'POST'],
  38. ['name' => 'renewPassword#showRenewPasswordForm', 'url' => '/renewpassword/{user}', 'verb' => 'GET'],
  39. ['name' => 'renewPassword#cancel', 'url' => '/renewpassword/cancel', 'verb' => 'GET'],
  40. ['name' => 'renewPassword#showLoginFormInvalidPassword', 'url' => '/renewpassword/invalidlogin/{user}', 'verb' => 'GET'],
  41. ]
  42. ]);