summaryrefslogtreecommitdiffstats
path: root/apps/files_external/appinfo/app.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-02-10 16:44:29 +0100
committerVincent Petry <pvince81@owncloud.com>2015-02-10 16:44:29 +0100
commitbd01ff135acb18d5be817ba153adaab9ac431782 (patch)
treea96fb641999405e4685f1021f00e9196e9e33854 /apps/files_external/appinfo/app.php
parent5ae03fd650b6f3665d1c69ead674d4f5d6420513 (diff)
parent64f4f8fc84fd8fc27f0e9e316a2c4c2500c7134f (diff)
downloadnextcloud-server-bd01ff135acb18d5be817ba153adaab9ac431782.tar.gz
nextcloud-server-bd01ff135acb18d5be817ba153adaab9ac431782.zip
Merge pull request #13190 from is-apps/master-sftp-key
Add SFTP public key authentication support
Diffstat (limited to 'apps/files_external/appinfo/app.php')
-rw-r--r--apps/files_external/appinfo/app.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files_external/appinfo/app.php b/apps/files_external/appinfo/app.php
index cb882463a1a..70f6b0159a6 100644
--- a/apps/files_external/appinfo/app.php
+++ b/apps/files_external/appinfo/app.php
@@ -18,6 +18,7 @@ OC::$CLASSPATH['OC\Files\Storage\SMB_OC'] = 'files_external/lib/smb_oc.php';
OC::$CLASSPATH['OC\Files\Storage\AmazonS3'] = 'files_external/lib/amazons3.php';
OC::$CLASSPATH['OC\Files\Storage\Dropbox'] = 'files_external/lib/dropbox.php';
OC::$CLASSPATH['OC\Files\Storage\SFTP'] = 'files_external/lib/sftp.php';
+OC::$CLASSPATH['OC\Files\Storage\SFTP_Key'] = 'files_external/lib/sftp_key.php';
OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
OC::$CLASSPATH['OCA\Files\External\Api'] = 'files_external/lib/api.php';
@@ -196,5 +197,17 @@ OC_Mount_Config::registerBackend('\OC\Files\Storage\SFTP', [
],
]);
+OC_Mount_Config::registerBackend('\OC\Files\Storage\SFTP_Key', [
+ 'backend' => 'SFTP with secret key login',
+ 'priority' => 100,
+ 'configuration' => array(
+ 'host' => (string)$l->t('Host'),
+ 'user' => (string)$l->t('Username'),
+ 'public_key' => (string)$l->t('Public key'),
+ 'private_key' => '#private_key',
+ 'root' => '&'.$l->t('Remote subfolder')),
+ 'custom' => 'sftp_key',
+ ]
+);
$mountProvider = new \OCA\Files_External\Config\ConfigAdapter();
\OC::$server->getMountProviderCollection()->registerProvider($mountProvider);