OpenStackV2.php 929 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCA\Files_External\Lib\Auth\OpenStack;
  8. use OCA\Files_External\Lib\Auth\AuthMechanism;
  9. use OCA\Files_External\Lib\DefinitionParameter;
  10. use OCP\IL10N;
  11. /**
  12. * OpenStack Keystone authentication
  13. */
  14. class OpenStackV2 extends AuthMechanism {
  15. public function __construct(IL10N $l) {
  16. $this
  17. ->setIdentifier('openstack::openstack')
  18. ->setScheme(self::SCHEME_OPENSTACK)
  19. ->setText($l->t('OpenStack v2'))
  20. ->addParameters([
  21. new DefinitionParameter('user', $l->t('Login')),
  22. (new DefinitionParameter('password', $l->t('Password')))
  23. ->setType(DefinitionParameter::VALUE_PASSWORD),
  24. new DefinitionParameter('tenant', $l->t('Tenant name')),
  25. new DefinitionParameter('url', $l->t('Identity endpoint URL')),
  26. ])
  27. ;
  28. }
  29. }