2015-08-13 00:10:30 +03:00
|
|
|
<?php
|
2019-12-03 21:57:53 +03:00
|
|
|
|
2018-02-14 17:08:52 +03:00
|
|
|
declare(strict_types=1);
|
2019-12-03 21:57:53 +03:00
|
|
|
|
2015-08-13 00:10:30 +03:00
|
|
|
/**
|
2018-02-14 17:08:52 +03:00
|
|
|
* @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
|
2016-07-21 17:49:16 +03:00
|
|
|
*
|
2020-04-29 12:57:22 +03:00
|
|
|
* @author Julien Lutran <julien.lutran@corp.ovh.com>
|
2019-12-03 21:57:53 +03:00
|
|
|
* @author Robin Appelman <robin@icewind.nl>
|
|
|
|
* @author Robin McCorkell <robin@mccorkell.me.uk>
|
|
|
|
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
*
|
2018-02-14 17:08:52 +03:00
|
|
|
* @license GNU AGPL version 3 or any later version
|
2015-08-13 00:10:30 +03:00
|
|
|
*
|
2018-02-14 17:08:52 +03:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
2015-08-13 00:10:30 +03:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2018-02-14 17:08:52 +03:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2015-08-13 00:10:30 +03:00
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
2018-02-14 17:08:52 +03:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
2019-12-03 21:57:53 +03:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2015-08-13 00:10:30 +03:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCA\Files_External\Lib\Auth\OpenStack;
|
|
|
|
|
2019-11-22 22:52:10 +03:00
|
|
|
use OCA\Files_External\Lib\Auth\AuthMechanism;
|
|
|
|
use OCA\Files_External\Lib\DefinitionParameter;
|
|
|
|
use OCP\IL10N;
|
2015-08-13 00:10:30 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* OpenStack Keystone authentication
|
|
|
|
*/
|
2018-02-14 17:08:52 +03:00
|
|
|
class OpenStackV3 extends AuthMechanism {
|
2015-08-13 00:10:30 +03:00
|
|
|
public function __construct(IL10N $l) {
|
|
|
|
$this
|
2018-02-14 17:08:52 +03:00
|
|
|
->setIdentifier('openstack::openstackv3')
|
2015-08-13 00:10:30 +03:00
|
|
|
->setScheme(self::SCHEME_OPENSTACK)
|
2018-02-14 17:08:52 +03:00
|
|
|
->setText($l->t('OpenStack v3'))
|
2015-08-13 00:10:30 +03:00
|
|
|
->addParameters([
|
2018-02-26 14:58:19 +03:00
|
|
|
new DefinitionParameter('user', $l->t('Username')),
|
|
|
|
new DefinitionParameter('domain', $l->t('Domain')),
|
2015-08-13 00:10:30 +03:00
|
|
|
(new DefinitionParameter('password', $l->t('Password')))
|
|
|
|
->setType(DefinitionParameter::VALUE_PASSWORD),
|
2020-02-19 13:23:51 +03:00
|
|
|
new DefinitionParameter('tenant', $l->t('Tenant name')),
|
2018-02-14 17:08:52 +03:00
|
|
|
new DefinitionParameter('url', $l->t('Identity endpoint URL'))
|
2015-08-13 00:10:30 +03:00
|
|
|
])
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|