summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Command/Backends.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/Command/Backends.php')
-rw-r--r--apps/files_external/lib/Command/Backends.php21
1 files changed, 3 insertions, 18 deletions
diff --git a/apps/files_external/lib/Command/Backends.php b/apps/files_external/lib/Command/Backends.php
index d1da6db3f6a..260ea210397 100644
--- a/apps/files_external/lib/Command/Backends.php
+++ b/apps/files_external/lib/Command/Backends.php
@@ -98,30 +98,15 @@ class Backends extends Base {
$result = [
'name' => $data['name'],
'identifier' => $data['identifier'],
- 'configuration' => $this->formatConfiguration($data['configuration'])
+ 'configuration' => array_map(function (DefinitionParameter $parameter) {
+ return $parameter->getTypeName();
+ }, $data['configuration'])
];
if ($backend instanceof Backend) {
$result['storage_class'] = $backend->getStorageClass();
$authBackends = $this->backendService->getAuthMechanismsByScheme(array_keys($backend->getAuthSchemes()));
$result['supported_authentication_backends'] = array_keys($authBackends);
- $authConfig = array_map(function (AuthMechanism $auth) {
- return $this->serializeAuthBackend($auth)['configuration'];
- }, $authBackends);
- $result['authentication_configuration'] = array_combine(array_keys($authBackends), $authConfig);
}
return $result;
}
-
- /**
- * @param DefinitionParameter[] $parameters
- * @return string[]
- */
- private function formatConfiguration(array $parameters) {
- $configuration = array_filter($parameters, function (DefinitionParameter $parameter) {
- return $parameter->getType() !== DefinitionParameter::VALUE_HIDDEN;
- });
- return array_map(function (DefinitionParameter $parameter) {
- return $parameter->getTypeName();
- }, $configuration);
- }
}