Completed
Pull Request — master (#26700)
by Philipp
08:19
created

lib/Lib/Auth/OpenStack/Rackspace.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * @author Robin McCorkell <[email protected]>
4
 *
5
 * @copyright Copyright (c) 2016, ownCloud GmbH.
6
 * @license AGPL-3.0
7
 *
8
 * This code is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU Affero General Public License, version 3,
10
 * as published by the Free Software Foundation.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 * GNU Affero General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License, version 3,
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
19
 *
20
 */
21
22
namespace OCA\Files_External\Lib\Auth\OpenStack;
23
24
use \OCP\IL10N;
25
use \OCA\Files_External\Lib\DefinitionParameter;
26
use \OCA\Files_External\Lib\Auth\AuthMechanism;
27
28
/**
29
 * Rackspace authentication
30
 */
31 View Code Duplication
class Rackspace extends AuthMechanism {
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
32
33
	public function __construct(IL10N $l) {
34
		$this
35
			->setIdentifier('openstack::rackspace')
36
			->setScheme(self::SCHEME_OPENSTACK)
37
			->setText($l->t('Rackspace'))
38
			->addParameters([
39
				(new DefinitionParameter('user', $l->t('Username'))),
40
				(new DefinitionParameter('key', $l->t('API key')))
41
					->setType(DefinitionParameter::VALUE_PASSWORD),
42
			])
43
		;
44
	}
45
46
}
47