summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/auth/password
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-01-19 14:16:11 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-29 14:51:30 +0100
commit860d51487b103f4c050d2427c35ee70dd4b2b05e (patch)
treea59988eaaba438fa2fa5dbb6ac574d81cc2fb047 /apps/files_external/lib/auth/password
parentf3e9729a5f68fa36ee6633955b7913f37e1c890e (diff)
downloadnextcloud-server-860d51487b103f4c050d2427c35ee70dd4b2b05e.tar.gz
nextcloud-server-860d51487b103f4c050d2427c35ee70dd4b2b05e.zip
Allow setting user provided credentials from the personal settings page
Diffstat (limited to 'apps/files_external/lib/auth/password')
-rw-r--r--apps/files_external/lib/auth/password/userprovided.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_external/lib/auth/password/userprovided.php b/apps/files_external/lib/auth/password/userprovided.php
index 8854513e161..b0ff50a279a 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\DefinitionParameter;
use OCP\IL10N;
use OCP\IUser;
use OCA\Files_External\Lib\Auth\AuthMechanism;
@@ -46,7 +47,13 @@ class UserProvided extends AuthMechanism {
->setIdentifier('password::userprovided')
->setScheme(self::SCHEME_PASSWORD)
->setText($l->t('User provided'))
- ->addParameters([]);
+ ->addParameters([
+ (new DefinitionParameter('user', $l->t('Username')))
+ ->setFlag(DefinitionParameter::FLAG_USER_PROVIDED),
+ (new DefinitionParameter('password', $l->t('Password')))
+ ->setType(DefinitionParameter::VALUE_PASSWORD)
+ ->setFlag(DefinitionParameter::FLAG_USER_PROVIDED),
+ ]);
}
private function getCredentialsIdentifier($storageId) {