From 9b5f01c723ed3fef5352e107882f35b0bbd26c11 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse <guillaume.rousse@renater.fr> Date: Fri, 3 Aug 2018 15:50:06 +0200 Subject: [PATCH] better variable name --- lib/AccountManager/App.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm index 6d63b81..03a4f72 100644 --- a/lib/AccountManager/App.pm +++ b/lib/AccountManager/App.pm @@ -353,14 +353,14 @@ sub req_complete_challenge { my $metadata_file = $self->get_metadata_file(federation => $federation); - my $provider = AccountManager::ServiceProvider->new( + my $sp = AccountManager::ServiceProvider->new( db => $self->{db}, entityid => $entityid, ); $self->abort( log => sprintf("No such SP '%s' in database", $entityid), user => "no_such_entity" - ) if !$provider->load(speculative => 1); + ) if !$sp->load(speculative => 1); # override metadata contacts if needed my $contacts = @@ -369,10 +369,10 @@ sub req_complete_challenge { if ($contacts) { if ($contacts =~ /^\+(.+)/) { # complement original contacts - $provider->contacts($provider->contacts(), split(/, */, $1)); + $sp->contacts($sp->contacts(), split(/, */, $1)); } else { # replace original contacts - $provider->contacts(split(/, */, $contacts)); + $sp->contacts(split(/, */, $contacts)); } } @@ -380,7 +380,7 @@ sub req_complete_challenge { $self->abort( log => "Requested a token for SP $entityid with unautorized address $email", user => "internal", - ) if !$provider->is_contact($email); + ) if !$sp->is_contact($email); # delete any previous token for the same email/service couple my $old_token = AccountManager::Token->new( -- GitLab