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

import IdPs too

parent fae128e7
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@ foreach my $id (split(/, */, $configuration->{groups}->{list})) {
print "parsing metadata from file $file\n" if $options{verbose};
my $entities;
eval {
$entities = $metadata->parse(type => 'sp');
$entities = $metadata->parse();
};
if ($EVAL_ERROR) {
$db->rollback();
......@@ -86,11 +86,15 @@ foreach my $id (split(/, */, $configuration->{groups}->{list})) {
}
foreach my $entry (@$entities) {
# avoid duplicates
# skip duplicates
next if $seen{$entry->{entityid}}++;
# skip entities different from SP or IdP
next if !$entry->{type};
my $entity = AccountManager::Entity->new(
db => $db,
type => $entry->{type},
entityid => $entry->{entityid},
displayname => $entry->{display_name},
information_url => $entry->{information_url},
......
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