From 057a1869cace85f8ea2931a92329988e509225d8 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Wed, 22 Apr 2015 08:06:32 +0000 Subject: QT-1900 Update the setup script. The setup script was unaware of the OAuth2 credentials that have to be set in the configuration. This made it delete them whenever it was run. This patch fixes the setup script and makes it ask for the credentials, too. --- lib/Net/MulkyID/Setup.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Net') diff --git a/lib/Net/MulkyID/Setup.pm b/lib/Net/MulkyID/Setup.pm index 2393023..59ad0d6 100755 --- a/lib/Net/MulkyID/Setup.pm +++ b/lib/Net/MulkyID/Setup.pm @@ -58,6 +58,8 @@ sub setup() { my $basepath = $::MULKONF->{basepath} // "/browserid"; my $fake_domain = $::MULKONF->{fake_domain} // ""; my $real_domain = $::MULKONF->{real_domain} // ""; + my $google_oauth2_client_secret = $::MULKONF->{google_oauth2_client_secret} // ""; + my $google_oauth2_client_id = $::MULKONF->{google_oauth2_client_id} // ""; $configpath = prompt("Where shall I put configuration files?", $configpath); $pemfile = prompt("Where shall I put the private key?", $pemfile); $auth_type = prompt("How will users authenticate? (imap, google)", $auth_type); @@ -76,6 +78,8 @@ sub setup() { $real_domain = prompt("Real domain name?", $real_domain); $real_domain = '' if ($real_domain eq '.'); } + $google_oauth2_client_id = prompt("Google OAuth2 client ID?", $google_oauth2_client_id); + $google_oauth2_client_secret = prompt("Google OAuth2 client secret?", $google_oauth2_client_secret); } default { die "Invalid authentication type"; @@ -126,6 +130,8 @@ sub setup() { auth_type => $auth_type, fake_domain => $fake_domain, real_domain => $real_domain, + google_oauth2_client_secret => $google_oauth2_client_secret, + google_oauth2_client_id => $google_oauth2_client_id }; write_file($conffile, <