diff --git a/bin/account-manager.pl.in b/bin/account-manager.pl.in index a235c1b15f403f4aa92787ff3a0e40fe9db3415a..729f12d63537a2ec940a4958e4ee630ea803f310 100755 --- a/bin/account-manager.pl.in +++ b/bin/account-manager.pl.in @@ -152,7 +152,7 @@ sub list_accounts { eval { AccountManager::Tools::update_ssp_authsources( - $configuration->{_}->{templates_dir}, + $configuration->{setup}->{templates_dir}, $configuration->{idp}->{accounts_file}, $accounts ); @@ -170,7 +170,7 @@ sub parse_metadata { eval { $federation_metadata = AccountManager::Metadata->new( - file => $configuration->{_}->{federation_metadata_file} + file => $configuration->{setup}->{federation_metadata_file} ); }; die "unable to load federation metadata: $EVAL_ERROR" if $EVAL_ERROR; @@ -178,7 +178,7 @@ sub parse_metadata { my $data = $federation_metadata->parse(id => $options{sp_entityid}); printf "Document %s parsed\n", - $configuration->{_}->{federation_metadata_file}; + $configuration->{setup}->{federation_metadata_file}; ## List SAML entities printf "Hashref representing the metadata:\n"; diff --git a/conf/manager.conf.in b/conf/manager.conf.in index 3add16eda6693248a025cb8f8a8e2b4d6ad9b580..bdfcdab9e2b8c538377087942c3bc2ab815a5853 100644 --- a/conf/manager.conf.in +++ b/conf/manager.conf.in @@ -2,17 +2,18 @@ # Token validity period, in hours tokens_validity_period = 2 -# Templates directory -templates_dir = @templatesdir@ - -# federation metadata local copy path -federation_metadata_file = @sysconfdir@/edugain-md.xml [app] version = open Beta 1 url = https://my.fqdn/accountmanager support_email = support@my.fqdn +[setup] +# templates directory +templates_dir = @templatesdir@ +# federation metadata local copy path +federation_metadata_file = @sysconfdir@/edugain-md.xml + [logger] file = /opt/testidp/IdPAccountManager/log/manager.log level = info diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm index 26d5fecc209d56cbc8b42cbf8c92afe75d831a1a..65078b172d5a52a85ec4221a8dd50d44351e8ddd 100644 --- a/lib/AccountManager/App.pm +++ b/lib/AccountManager/App.pm @@ -133,7 +133,7 @@ sub respond { ## Parse template my $tt2 = Template->new({ ENCODING => 'utf8', - INCLUDE_PATH => $self->{configuration}->{_}->{templates_dir} . "/web/$lang" + INCLUDE_PATH => $self->{configuration}->{setup}->{templates_dir} . "/web/$lang" }); $self->{logger}->debug("Responding with outer template '$in{template}' and inner template '$in{data}->{content}'"); @@ -160,7 +160,7 @@ sub req_select_sp { eval { $metadata = AccountManager::Metadata->new( - file => $self->{configuration}->{_}->{federation_metadata_file} + file => $self->{configuration}->{setup}->{federation_metadata_file} ); }; if ($EVAL_ERROR) { @@ -225,7 +225,7 @@ sub req_select_email { eval { $metadata = AccountManager::Metadata->new( - file => $self->{configuration}->{_}->{federation_metadata_file} + file => $self->{configuration}->{setup}->{federation_metadata_file} ); }; if ($EVAL_ERROR) { @@ -434,7 +434,7 @@ sub req_complete_challenge { my $tt2 = Template->new({ ENCODING => 'utf8', - INCLUDE_PATH => $self->{configuration}->{_}->{templates_dir} . "/mail/$lang" + INCLUDE_PATH => $self->{configuration}->{setup}->{templates_dir} . "/mail/$lang" }); my $template = 'send_authentication_token.tt2.eml'; my $data = { @@ -632,7 +632,7 @@ sub req_create_accounts { eval { AccountManager::Tools::update_ssp_authsources( - $self->{configuration}->{_}->{templates_dir}, + $self->{configuration}->{setup}->{templates_dir}, $self->{configuration}->{idp}->{accounts_file}, $accounts );