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

simplify configuration format

parent 3a6ebed9
No related branches found
No related tags found
No related merge requests found
......@@ -53,14 +53,13 @@ AccountManager::Entity->delete_entities(all => 1);
$db->dbh()->do('ALTER TABLE entities AUTO_INCREMENT = 1');
my %seen;
foreach my $id (split(/, */, $configuration->{groups}->{list})) {
my $spec = $configuration->{$id};
next unless $spec->{type} eq 'metadata';
foreach my $id (keys %{$configuration->{federations}}) {
print "processing federation $id\n" if $options{verbose};
my $file = File::Temp->new();
print "downloading metadata from url $spec->{url}\n" if $options{verbose};
my $response = $ua->get($spec->{url}, ':content_file' => $file->filename());
my $file = File::Temp->new();
my $url = $configuration->{federations}->{$id};
print "downloading metadata from url $url\n" if $options{verbose};
my $response = $ua->get($url, ':content_file' => $file->filename());
if (!$response->is_success()) {
$db->rollback();
die "failed to download federation metadata: " . $response->status_line();
......
......@@ -11,23 +11,10 @@ templates_dir = @templatesdir@
templates_theme = edugain
accounts_file = /var/lib/access-check/accounts.php
[groups]
list = self, renater, edugain
[self]
type = organization
label = my own organization
[renater]
type = metadata
file = /var/lib/access-check/renater.xml
label = fédération Education-Recherche
[edugain]
type = link
url = https://access-check.edugain.org
label = eduGAIN
message = eduGAIN Access Check
[federations]
# list of all federations from which to fetch metadata
edugain = https://mds.edugain.org/
aconet = https://eduid.at/md/aconet-registered.xml
[logger]
file = /var/log/access-check/manager.log
......
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