aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <matthias.benkard@egym.de>2015-04-22 08:06:32 +0000
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2015-04-23 21:55:02 +0200
commit057a1869cace85f8ea2931a92329988e509225d8 (patch)
tree5b1068fefdf4dc1f61fca7746ba579628a56e8f8
parentba65cc50b7b468f0738398312a468ea413727bdc (diff)
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.
-rwxr-xr-xlib/Net/MulkyID/Setup.pm6
1 files changed, 6 insertions, 0 deletions
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, <<EOF
#! /usr/bin/env perl