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

drop useless checks

no failure scenario identified so far..
parent 21df9fac
No related branches found
No related tags found
No related merge requests found
......@@ -93,9 +93,6 @@ sub add_account {
scope => $configuration->{idp}->{scope},
);
die "Failed to create test account\n"
unless $test_account;
my $entity = $options{sp_entityid};
my $validity_period =
$configuration->{$entity}->{account_validity_period} ||
......@@ -210,8 +207,6 @@ sub add_provider {
contacts => $options{contacts},
displayname => $options{displayname}
);
die "failed to create service provider\n"
unless $provider;
}
$provider->save() or die "failed to save service provider";
......@@ -316,9 +311,6 @@ sub add_token {
sp_entityid => $options{sp_entityid}
);
die "failed to create authentication token\n"
unless $token;
## First remove token if on exist for this email+SP
if ($token->load(speculative => 1)) {
$token->delete() or die "failed to delete authentication token\n";
......@@ -328,8 +320,6 @@ sub add_token {
email_address => $options{email_address},
sp_entityid => $options{sp_entityid}
);
die "failed to create authentication token\n"
unless $token;
}
$token->save() or die "failed to save authentication token\n";
......
......@@ -323,11 +323,6 @@ sub req_generate_token {
email_address => $self->{in}->{email_address},
sp_entityid => $self->{in}->{sp_entityid}
);
unless (defined $token) {
push @{ $self->{out}->{errors} }, "internal";
$self->{logger}->error("Failed to create authentication token");
return;
}
## First remove token if one exist for this email+SP
if ($token->load(speculative => 1)) {
......@@ -345,11 +340,6 @@ sub req_generate_token {
email_address => $self->{in}->{email_address},
sp_entityid => $self->{in}->{sp_entityid}
);
unless (defined $token) {
push @{ $self->{out}->{errors} }, "internal";
$self->{logger}->error("Failed to create authentication token");
return;
}
}
unless ($token->save()) {
......@@ -479,7 +469,6 @@ sub req_validate_token {
sp_entityid => $entity,
scope => $self->{configuration}->{idp}->{scope},
);
next unless $account;
next unless $account->save(accounts_validity_period => $validity_period);
push @accounts, $account;
}
......
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