2015-08-12 17:10:30 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-02-14 09:08:52 -05:00
|
|
|
declare(strict_types=1);
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2015-08-12 17:10:30 -04:00
|
|
|
/**
|
2024-06-06 03:55:47 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2015-08-12 17:10:30 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCA\Files_External\Lib\Auth\OpenStack;
|
|
|
|
|
|
2019-11-22 14:52:10 -05:00
|
|
|
use OCA\Files_External\Lib\Auth\AuthMechanism;
|
|
|
|
|
use OCA\Files_External\Lib\DefinitionParameter;
|
|
|
|
|
use OCP\IL10N;
|
2015-08-12 17:10:30 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* OpenStack Keystone authentication
|
|
|
|
|
*/
|
2018-02-14 09:08:52 -05:00
|
|
|
class OpenStackV3 extends AuthMechanism {
|
2015-08-12 17:10:30 -04:00
|
|
|
public function __construct(IL10N $l) {
|
|
|
|
|
$this
|
2018-02-14 09:08:52 -05:00
|
|
|
->setIdentifier('openstack::openstackv3')
|
2015-08-12 17:10:30 -04:00
|
|
|
->setScheme(self::SCHEME_OPENSTACK)
|
2018-02-14 09:08:52 -05:00
|
|
|
->setText($l->t('OpenStack v3'))
|
2015-08-12 17:10:30 -04:00
|
|
|
->addParameters([
|
2024-02-13 08:37:09 -05:00
|
|
|
new DefinitionParameter('user', $l->t('Login')),
|
2018-02-26 06:58:19 -05:00
|
|
|
new DefinitionParameter('domain', $l->t('Domain')),
|
2015-08-12 17:10:30 -04:00
|
|
|
(new DefinitionParameter('password', $l->t('Password')))
|
|
|
|
|
->setType(DefinitionParameter::VALUE_PASSWORD),
|
2020-02-19 05:23:51 -05:00
|
|
|
new DefinitionParameter('tenant', $l->t('Tenant name')),
|
2018-02-14 09:08:52 -05:00
|
|
|
new DefinitionParameter('url', $l->t('Identity endpoint URL'))
|
2015-08-12 17:10:30 -04:00
|
|
|
])
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
}
|