diff options
Diffstat (limited to 'apps/files_external/controller/ajaxcontroller.php')
-rw-r--r-- | apps/files_external/controller/ajaxcontroller.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_external/controller/ajaxcontroller.php b/apps/files_external/controller/ajaxcontroller.php index cfccacb03ea..86c1b657c91 100644 --- a/apps/files_external/controller/ajaxcontroller.php +++ b/apps/files_external/controller/ajaxcontroller.php @@ -23,6 +23,7 @@ namespace OCA\Files_External\Controller; +use OCA\Files_External\Lib\Auth\Password\GlobalAuth; use OCP\AppFramework\Controller; use OCP\IRequest; use OCP\AppFramework\Http\JSONResponse; @@ -31,10 +32,13 @@ use OCA\Files_External\Lib\Auth\PublicKey\RSA; class AjaxController extends Controller { /** @var RSA */ private $rsaMechanism; + /** @var GlobalAuth */ + private $globalAuth; - public function __construct($appName, IRequest $request, RSA $rsaMechanism) { + public function __construct($appName, IRequest $request, RSA $rsaMechanism, GlobalAuth $globalAuth) { parent::__construct($appName, $request); $this->rsaMechanism = $rsaMechanism; + $this->globalAuth = $globalAuth; } private function generateSshKeys() { @@ -61,4 +65,8 @@ class AjaxController extends Controller { )); } + public function saveGlobalCredentials($uid, $user, $password) { + $this->globalAuth->saveAuth($uid, $user, $password); + return true; + } } |