summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-02-05 15:48:10 +0100
committerRobin Appelman <icewind@owncloud.com>2016-02-05 15:48:10 +0100
commit239cdd099a2ef9d4bead6d887c9dd2a0acdfee45 (patch)
treec136b50b4a7da22e6ebc7701b2cdf042eab014d2
parent54d2175bf585821c87081b432b90a64e466d3f67 (diff)
downloadnextcloud-server-239cdd099a2ef9d4bead6d887c9dd2a0acdfee45.tar.gz
nextcloud-server-239cdd099a2ef9d4bead6d887c9dd2a0acdfee45.zip
list supported auth backends for storage backends
-rw-r--r--apps/files_external/command/backends.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_external/command/backends.php b/apps/files_external/command/backends.php
index 8219c5d80bb..fd11c36ec40 100644
--- a/apps/files_external/command/backends.php
+++ b/apps/files_external/command/backends.php
@@ -22,6 +22,7 @@
namespace OCA\Files_External\Command;
use OC\Core\Command\Base;
+use OCA\Files_External\Lib\Auth\AuthMechanism;
use OCA\Files_External\Lib\Backend\Backend;
use OCA\Files_External\Lib\DefinitionParameter;
use OCA\Files_External\Service\BackendService;
@@ -103,6 +104,8 @@ class Backends extends Base {
];
if ($backend instanceof Backend) {
$result['storage_class'] = $backend->getStorageClass();
+ $authBackends = $this->backendService->getAuthMechanismsByScheme(array_keys($backend->getAuthSchemes()));
+ $result['supported_authentication_backends'] = array_keys($authBackends);
}
return $result;
}