Skip to content
Snippets Groups Projects
Commit 13183de6 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

make IdP accounts file location configurable

parent a6fb8b87
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,9 @@ idp_entityid = https://my.fqdn/simplesaml/saml2/idp/metadata.php
# Name of the IdP
idp_displayname = eduGAIN Access Check
# IdP test accounts file
idp_accounts_file = = @sysconfdir@/accounts.php
# Root simpleSamlPhp directory
root_ssp_dir = /opt/testidp/simplesamlphp
......
......@@ -82,7 +82,7 @@ sub generate_password {
## Updates simpleSamlPhp authsources.php configuration file
sub update_ssp_authsources {
my ($templates_dir, $conf) = @_;
my ($templates_dir, $output) = @_;
my $tt2 = Template->new({
INCLUDE_PATH => $templates_dir
......@@ -90,9 +90,7 @@ sub update_ssp_authsources {
my $template = 'accountProfiles/valid-accounts.php.tt2';
my $data = {
accounts => IdPAccountManager::Data::TestAccount::Manager->get_testaccounts(),
conf => $conf,
};
my $output = 'conf/valid-accounts.php';
return $tt2->process($template, $data, $output);
}
......
......@@ -487,7 +487,7 @@ sub req_validate_token {
## Update simpleSAMLphp configuration to enable test accounts
unless (IdPAccountManager::Tools::update_ssp_authsources(
$self->{configuration}->{templates_dir},
$self->{configuration}
$self->{configuration}->{idp_accounts_file}
)) {
push @{ $self->{out}->{errors} }, "accounts_creation_failed";
$self->{logger}->error(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment