2015-08-12 17:10:30 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2015-08-12 17:10:30 -04:00
|
|
|
/**
|
2024-06-06 03:55:47 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
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 OpenStackV2 extends AuthMechanism {
|
2015-08-12 17:10:30 -04:00
|
|
|
public function __construct(IL10N $l) {
|
|
|
|
|
$this
|
|
|
|
|
->setIdentifier('openstack::openstack')
|
|
|
|
|
->setScheme(self::SCHEME_OPENSTACK)
|
2018-02-14 09:08:52 -05:00
|
|
|
->setText($l->t('OpenStack v2'))
|
2015-08-12 17:10:30 -04:00
|
|
|
->addParameters([
|
2024-02-13 08:37:09 -05:00
|
|
|
new DefinitionParameter('user', $l->t('Login')),
|
2015-08-12 17:10:30 -04:00
|
|
|
(new DefinitionParameter('password', $l->t('Password')))
|
|
|
|
|
->setType(DefinitionParameter::VALUE_PASSWORD),
|
2018-01-26 17:46:40 -05:00
|
|
|
new DefinitionParameter('tenant', $l->t('Tenant name')),
|
|
|
|
|
new DefinitionParameter('url', $l->t('Identity endpoint URL')),
|
2015-08-12 17:10:30 -04:00
|
|
|
])
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
}
|