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

fix accessor names

parent a5e53a5d
No related branches found
No related tags found
No related merge requests found
......@@ -349,41 +349,41 @@ sub req_generate_token {
return undef;
}
my $authentication_token = IdPAccountManager::Data::AuthenticationToken->new(
my $token = IdPAccountManager::Data::AuthenticationToken->new(
db => $self->{db},
email_address => $self->{in}->{email_address},
sp_entityid => $self->{in}->{sp_entityid}
);
unless (defined $authentication_token) {
unless (defined $token) {
push @{ $self->{out}->{errors} }, "internal";
$self->{logger}->error("Failed to create authentication token");
return undef;
}
## First remove token if one exist for this email+SP
if ($authentication_token->load(speculative => 1)) {
unless ($authentication_token->delete()) {
if ($token->load(speculative => 1)) {
unless ($token->delete()) {
push @{ $self->{out}->{errors} }, "internal";
$self->{logger}->errorf(
"Failed to delete previous authentication token with ID %s",
$authentication_token->get('id')
$token->id()
);
return undef;
}
$authentication_token = IdPAccountManager::Data::AuthenticationToken->new(
$token = IdPAccountManager::Data::AuthenticationToken->new(
db => $self->{db},
email_address => $self->{in}->{email_address},
sp_entityid => $self->{in}->{sp_entityid}
);
unless (defined $authentication_token) {
unless (defined $token) {
push @{ $self->{out}->{errors} }, "internal";
$self->{logger}->error("Failed to create authentication token");
return undef;
}
}
unless ($authentication_token->save()) {
unless ($token->save()) {
push @{ $self->{out}->{errors} }, "internal";
$self->{logger}->error("Failed to save authentication token");
return undef;
......@@ -411,7 +411,7 @@ sub req_generate_token {
from => $self->{configuration}->{notice_from},
to => $self->{in}->{email_address},
sp_entityid => $self->{in}->{sp_entityid},
authentication_token => $authentication_token->get('token'),
authentication_token => $token->token(),
}
);
};
......@@ -421,7 +421,7 @@ sub req_generate_token {
"Token send to %s for sp_entityid=%s;token=%s",
$self->{in}->{email_address},
$self->{in}->{sp_entityid},
$authentication_token->get('token'),
$token->token(),
);
return 1;
......
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