Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/twofactor_gateway.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Command/Configure.php')
-rw-r--r--lib/Command/Configure.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/Command/Configure.php b/lib/Command/Configure.php
index 095f4cd..0079d90 100644
--- a/lib/Command/Configure.php
+++ b/lib/Command/Configure.php
@@ -102,7 +102,7 @@ class Configure extends Command {
private function configureSms(InputInterface $input, OutputInterface $output) {
$helper = $this->getHelper('question');
- $providerQuestion = new Question('Please choose a SMS provider (websms, playsms, clockworksms, puzzelsms, ecallsms): ', 'websms');
+ $providerQuestion = new Question('Please choose a SMS provider (websms, playsms, clockworksms, puzzelsms, ecallsms, voipms): ', 'websms');
$provider = $helper->ask($input, $output, $providerQuestion);
/** @var SMSConfig $config */
@@ -190,6 +190,26 @@ class Configure extends Command {
$providerConfig->setSenderId($senderId);
break;
+ case 'voipms':
+ $config->setProvider($provider);
+
+ /** @var VoipMsConfig $providerConfig */
+ $providerConfig = $config->getProvider()->getConfig();
+
+ $usernameQuestion = new Question('Please enter your VoIP.ms API username: ');
+ $username = $helper->ask($input, $output, $usernameQuestion);
+
+ $passwordQuestion = new Question('Please enter your VoIP.ms API password: ');
+ $password = $helper->ask($input, $output, $passwordQuestion);
+
+ $didQuestion = new Question('Please enter your VoIP.ms DID: ');
+ $did = $helper->ask($input, $output, $didQuestion);
+
+ $providerConfig->setUser($username);
+ $providerConfig->setPassword($password);
+ $providerConfig->setDid($did);
+ break;
+
default:
$output->writeln("Invalid provider $provider");
break;