@@ -31,22 +31,22 @@ |
||
31 | 31 | */ |
32 | 32 | class OAuth2 extends AuthMechanism { |
33 | 33 | |
34 | - public function __construct(IL10N $l) { |
|
35 | - $this |
|
36 | - ->setIdentifier('oauth2::oauth2') |
|
37 | - ->setScheme(self::SCHEME_OAUTH2) |
|
38 | - ->setText($l->t('OAuth2')) |
|
39 | - ->addParameters([ |
|
40 | - (new DefinitionParameter('configured', 'configured')) |
|
41 | - ->setType(DefinitionParameter::VALUE_HIDDEN), |
|
42 | - (new DefinitionParameter('client_id', $l->t('Client ID'))), |
|
43 | - (new DefinitionParameter('client_secret', $l->t('Client secret'))) |
|
44 | - ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
45 | - (new DefinitionParameter('token', 'token')) |
|
46 | - ->setType(DefinitionParameter::VALUE_HIDDEN), |
|
47 | - ]) |
|
48 | - ->addCustomJs('oauth2') |
|
49 | - ; |
|
50 | - } |
|
34 | + public function __construct(IL10N $l) { |
|
35 | + $this |
|
36 | + ->setIdentifier('oauth2::oauth2') |
|
37 | + ->setScheme(self::SCHEME_OAUTH2) |
|
38 | + ->setText($l->t('OAuth2')) |
|
39 | + ->addParameters([ |
|
40 | + (new DefinitionParameter('configured', 'configured')) |
|
41 | + ->setType(DefinitionParameter::VALUE_HIDDEN), |
|
42 | + (new DefinitionParameter('client_id', $l->t('Client ID'))), |
|
43 | + (new DefinitionParameter('client_secret', $l->t('Client secret'))) |
|
44 | + ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
45 | + (new DefinitionParameter('token', 'token')) |
|
46 | + ->setType(DefinitionParameter::VALUE_HIDDEN), |
|
47 | + ]) |
|
48 | + ->addCustomJs('oauth2') |
|
49 | + ; |
|
50 | + } |
|
51 | 51 | |
52 | 52 | } |
@@ -28,10 +28,10 @@ |
||
28 | 28 | * For auth mechanisms where the user needs to provide credentials |
29 | 29 | */ |
30 | 30 | interface IUserProvided { |
31 | - /** |
|
32 | - * @param IUser $user the user for which to save the user provided options |
|
33 | - * @param int $mountId the mount id to save the options for |
|
34 | - * @param array $options the user provided options |
|
35 | - */ |
|
36 | - public function saveBackendOptions(IUser $user, $mountId, array $options); |
|
31 | + /** |
|
32 | + * @param IUser $user the user for which to save the user provided options |
|
33 | + * @param int $mountId the mount id to save the options for |
|
34 | + * @param array $options the user provided options |
|
35 | + */ |
|
36 | + public function saveBackendOptions(IUser $user, $mountId, array $options); |
|
37 | 37 | } |
@@ -31,17 +31,17 @@ |
||
31 | 31 | */ |
32 | 32 | class Rackspace extends AuthMechanism { |
33 | 33 | |
34 | - public function __construct(IL10N $l) { |
|
35 | - $this |
|
36 | - ->setIdentifier('openstack::rackspace') |
|
37 | - ->setScheme(self::SCHEME_OPENSTACK) |
|
38 | - ->setText($l->t('Rackspace')) |
|
39 | - ->addParameters([ |
|
40 | - (new DefinitionParameter('user', $l->t('Username'))), |
|
41 | - (new DefinitionParameter('key', $l->t('API key'))) |
|
42 | - ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
43 | - ]) |
|
44 | - ; |
|
45 | - } |
|
34 | + public function __construct(IL10N $l) { |
|
35 | + $this |
|
36 | + ->setIdentifier('openstack::rackspace') |
|
37 | + ->setScheme(self::SCHEME_OPENSTACK) |
|
38 | + ->setText($l->t('Rackspace')) |
|
39 | + ->addParameters([ |
|
40 | + (new DefinitionParameter('user', $l->t('Username'))), |
|
41 | + (new DefinitionParameter('key', $l->t('API key'))) |
|
42 | + ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
43 | + ]) |
|
44 | + ; |
|
45 | + } |
|
46 | 46 | |
47 | 47 | } |
@@ -31,19 +31,19 @@ |
||
31 | 31 | */ |
32 | 32 | class OpenStack extends AuthMechanism { |
33 | 33 | |
34 | - public function __construct(IL10N $l) { |
|
35 | - $this |
|
36 | - ->setIdentifier('openstack::openstack') |
|
37 | - ->setScheme(self::SCHEME_OPENSTACK) |
|
38 | - ->setText($l->t('OpenStack')) |
|
39 | - ->addParameters([ |
|
40 | - (new DefinitionParameter('user', $l->t('Username'))), |
|
41 | - (new DefinitionParameter('password', $l->t('Password'))) |
|
42 | - ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
43 | - (new DefinitionParameter('tenant', $l->t('Tenant name'))), |
|
44 | - (new DefinitionParameter('url', $l->t('Identity endpoint URL'))), |
|
45 | - ]) |
|
46 | - ; |
|
47 | - } |
|
34 | + public function __construct(IL10N $l) { |
|
35 | + $this |
|
36 | + ->setIdentifier('openstack::openstack') |
|
37 | + ->setScheme(self::SCHEME_OPENSTACK) |
|
38 | + ->setText($l->t('OpenStack')) |
|
39 | + ->addParameters([ |
|
40 | + (new DefinitionParameter('user', $l->t('Username'))), |
|
41 | + (new DefinitionParameter('password', $l->t('Password'))) |
|
42 | + ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
43 | + (new DefinitionParameter('tenant', $l->t('Tenant name'))), |
|
44 | + (new DefinitionParameter('url', $l->t('Identity endpoint URL'))), |
|
45 | + ]) |
|
46 | + ; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | } |
@@ -29,12 +29,12 @@ |
||
29 | 29 | */ |
30 | 30 | class Builtin extends AuthMechanism { |
31 | 31 | |
32 | - public function __construct(IL10N $l) { |
|
33 | - $this |
|
34 | - ->setIdentifier('builtin::builtin') |
|
35 | - ->setScheme(self::SCHEME_BUILTIN) |
|
36 | - ->setText($l->t('Builtin')) |
|
37 | - ; |
|
38 | - } |
|
32 | + public function __construct(IL10N $l) { |
|
33 | + $this |
|
34 | + ->setIdentifier('builtin::builtin') |
|
35 | + ->setScheme(self::SCHEME_BUILTIN) |
|
36 | + ->setText($l->t('Builtin')) |
|
37 | + ; |
|
38 | + } |
|
39 | 39 | |
40 | 40 | } |
@@ -29,12 +29,12 @@ |
||
29 | 29 | */ |
30 | 30 | class NullMechanism extends AuthMechanism { |
31 | 31 | |
32 | - public function __construct(IL10N $l) { |
|
33 | - $this |
|
34 | - ->setIdentifier('null::null') |
|
35 | - ->setScheme(self::SCHEME_NULL) |
|
36 | - ->setText($l->t('None')) |
|
37 | - ; |
|
38 | - } |
|
32 | + public function __construct(IL10N $l) { |
|
33 | + $this |
|
34 | + ->setIdentifier('null::null') |
|
35 | + ->setScheme(self::SCHEME_NULL) |
|
36 | + ->setText($l->t('None')) |
|
37 | + ; |
|
38 | + } |
|
39 | 39 | |
40 | 40 | } |
@@ -29,33 +29,33 @@ |
||
29 | 29 | */ |
30 | 30 | trait PriorityTrait { |
31 | 31 | |
32 | - /** @var int initial priority */ |
|
33 | - protected $priority = BackendService::PRIORITY_DEFAULT; |
|
34 | - |
|
35 | - /** |
|
36 | - * @return int |
|
37 | - */ |
|
38 | - public function getPriority() { |
|
39 | - return $this->priority; |
|
40 | - } |
|
41 | - |
|
42 | - /** |
|
43 | - * @param int $priority |
|
44 | - * @return self |
|
45 | - */ |
|
46 | - public function setPriority($priority) { |
|
47 | - $this->priority = $priority; |
|
48 | - return $this; |
|
49 | - } |
|
50 | - |
|
51 | - /** |
|
52 | - * @param PriorityTrait $a |
|
53 | - * @param PriorityTrait $b |
|
54 | - * @return int |
|
55 | - */ |
|
56 | - public static function priorityCompare(PriorityTrait $a, PriorityTrait $b) { |
|
57 | - return ($a->getPriority() - $b->getPriority()); |
|
58 | - } |
|
32 | + /** @var int initial priority */ |
|
33 | + protected $priority = BackendService::PRIORITY_DEFAULT; |
|
34 | + |
|
35 | + /** |
|
36 | + * @return int |
|
37 | + */ |
|
38 | + public function getPriority() { |
|
39 | + return $this->priority; |
|
40 | + } |
|
41 | + |
|
42 | + /** |
|
43 | + * @param int $priority |
|
44 | + * @return self |
|
45 | + */ |
|
46 | + public function setPriority($priority) { |
|
47 | + $this->priority = $priority; |
|
48 | + return $this; |
|
49 | + } |
|
50 | + |
|
51 | + /** |
|
52 | + * @param PriorityTrait $a |
|
53 | + * @param PriorityTrait $b |
|
54 | + * @return int |
|
55 | + */ |
|
56 | + public static function priorityCompare(PriorityTrait $a, PriorityTrait $b) { |
|
57 | + return ($a->getPriority() - $b->getPriority()); |
|
58 | + } |
|
59 | 59 | |
60 | 60 | } |
61 | 61 |
@@ -30,10 +30,10 @@ |
||
30 | 30 | */ |
31 | 31 | interface IBackendProvider { |
32 | 32 | |
33 | - /** |
|
34 | - * @since 9.1.0 |
|
35 | - * @return Backend[] |
|
36 | - */ |
|
37 | - public function getBackends(); |
|
33 | + /** |
|
34 | + * @since 9.1.0 |
|
35 | + * @return Backend[] |
|
36 | + */ |
|
37 | + public function getBackends(); |
|
38 | 38 | |
39 | 39 | } |
@@ -30,10 +30,10 @@ |
||
30 | 30 | */ |
31 | 31 | interface IAuthMechanismProvider { |
32 | 32 | |
33 | - /** |
|
34 | - * @since 9.1.0 |
|
35 | - * @return AuthMechanism[] |
|
36 | - */ |
|
37 | - public function getAuthMechanisms(); |
|
33 | + /** |
|
34 | + * @since 9.1.0 |
|
35 | + * @return AuthMechanism[] |
|
36 | + */ |
|
37 | + public function getAuthMechanisms(); |
|
38 | 38 | |
39 | 39 | } |