OpenStackV3.php 965 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  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 OpenStackV3 extends AuthMechanism {
  15. public function __construct(IL10N $l) {
  16. $this
  17. ->setIdentifier('openstack::openstackv3')
  18. ->setScheme(self::SCHEME_OPENSTACK)
  19. ->setText($l->t('OpenStack v3'))
  20. ->addParameters([
  21. new DefinitionParameter('user', $l->t('Login')),
  22. new DefinitionParameter('domain', $l->t('Domain')),
  23. (new DefinitionParameter('password', $l->t('Password')))
  24. ->setType(DefinitionParameter::VALUE_PASSWORD),
  25. new DefinitionParameter('tenant', $l->t('Tenant name')),
  26. new DefinitionParameter('url', $l->t('Identity endpoint URL'))
  27. ])
  28. ;
  29. }
  30. }