Commit 0b7e4f30 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Merge branch 'revert-48c5ccc3' into 'master'

Revert "Fix badcredentials display (#1536)"

See merge request lemonldap-ng/lemonldap-ng!43
parents 48c5ccc3 490d3eb1
......@@ -150,33 +150,13 @@ sub verify {
)
{
$self->userLogger->warn('Yubikey not registered');
$req->error(PE_BADCREDENTIALS);
return $self->fail($req);
return PE_BADCREDENTIALS;
}
if ( $self->yubi->otp($code) ne 'OK' ) {
$self->userLogger->warn('Yubikey verification failed');
$req->error(PE_BADCREDENTIALS);
return $self->fail($req);
return PE_BADCREDENTIALS;
}
PE_OK;
}
sub fail {
my ( $self, $req ) = @_;
$req->response(
$self->p->sendHtml(
$req,
'u2fcheck',
params => {
MAIN_LOGO => $self->conf->{portalMainLogo},
AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type,
SKIN => $self->conf->{portalSkin},
FAILED => 1
}
)
);
return PE_SENDRESPONSE;
}
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