diff --git a/bin/account-manager.pl.in b/bin/account-manager.pl.in index 802827e91f4fcd545df6591eaba799632dae1f3d..1364137b2f924c6d6fe9fbaf4943f07f180fd49c 100755 --- a/bin/account-manager.pl.in +++ b/bin/account-manager.pl.in @@ -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"; diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm index 0de49e51fd6e37f25d5d107093ef1dc86c779488..34701388380dc5e2dcedf56343c1d774f964ded2 100644 --- a/lib/IdPAccountManager/WebRequest.pm +++ b/lib/IdPAccountManager/WebRequest.pm @@ -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; }