diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-01-19 16:57:20 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-29 14:51:30 +0100 |
commit | 03c79ac24fdda8c32177aaf25851a4ad069e6517 (patch) | |
tree | d9ac29445a1f65de4869498d42eb17cb2739c55a /apps/files_external/lib/auth/password | |
parent | 5bdcd534b18ce842c6775f588c9a7330a82ed89d (diff) | |
download | nextcloud-server-03c79ac24fdda8c32177aaf25851a4ad069e6517.tar.gz nextcloud-server-03c79ac24fdda8c32177aaf25851a4ad069e6517.zip |
remove custom controler for user provided password auth
Diffstat (limited to 'apps/files_external/lib/auth/password')
-rw-r--r-- | apps/files_external/lib/auth/password/userprovided.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_external/lib/auth/password/userprovided.php b/apps/files_external/lib/auth/password/userprovided.php index 1c2cc0a6d97..e1c1352022f 100644 --- a/apps/files_external/lib/auth/password/userprovided.php +++ b/apps/files_external/lib/auth/password/userprovided.php @@ -21,6 +21,7 @@ namespace OCA\Files_External\Lib\Auth\Password; +use OCA\Files_External\Lib\Auth\IUserProvided; use OCA\Files_External\Lib\DefinitionParameter; use OCA\Files_External\Service\BackendService; use OCP\IL10N; @@ -34,7 +35,7 @@ use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException; /** * User provided Username and Password */ -class UserProvided extends AuthMechanism { +class UserProvided extends AuthMechanism implements IUserProvided { const CREDENTIALS_IDENTIFIER_PREFIX = 'password::userprovided/'; @@ -62,10 +63,10 @@ class UserProvided extends AuthMechanism { return self::CREDENTIALS_IDENTIFIER_PREFIX . $storageId; } - public function saveCredentials(IUser $user, $id, $username, $password) { + public function saveBackendOptions(IUser $user, $id, array $options) { $this->credentialsManager->store($user->getUID(), $this->getCredentialsIdentifier($id), [ - 'user' => $username, - 'password' => $password + 'user' => $options['user'], // explicitly copy the fields we want instead of just passing the entire $options array + 'password' => $options['password'] // this way we prevent users from being able to modify any other field ]); } |