Commit 46f2beb1 authored by Christophe Maudoux's avatar Christophe Maudoux

Typo & perltidy (#1629)

parent 06019075
Pipeline #4328 passed with stages
in 9 minutes and 55 seconds
......@@ -31,8 +31,8 @@ has ott => (
is => 'rw',
lazy => 1,
default => sub {
my $ott =
$_[0]->{p}->loadModule('Lemonldap::NG::Portal::Lib::OneTimeToken');
my $ott = $_[0]->{p}
->loadModule('Lemonldap::NG::Portal::Lib::OneTimeToken');
$ott->timeout( $_[0]->{conf}->{mail2fTimeout}
|| $_[0]->{conf}->{formTimeout} );
return $ott;
......@@ -80,8 +80,7 @@ sub run {
$subject = 'mail2fSubject';
$tr->( \$subject );
}
my $body;
my $html;
my ($body, $html);
if ( $self->conf->{mail2fBody} ) {
# We use a specific text message, no html
......@@ -139,16 +138,14 @@ sub verify {
return PE_ERROR;
}
$self->logger->debug("Verifying Mail 2F code: $usercode againt $savedcode");
$self->logger->debug(
"Verifying Mail 2F code: $usercode against $savedcode");
return PE_OK if ( $usercode eq $savedcode );
if ( $usercode eq $savedcode ) {
return PE_OK;
}
else {
$self->userLogger->warn( 'Second factor failed for '
. $session->{ $self->conf->{whatToTrace} } );
return PE_BADCREDENTIALS;
}
}
1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment