Cannot hook storeHistory method after 2FA failure
Concerned version
Version: 2.0.15
Summary
Currently, a plugin that triggers on storeHistory will not be called when 2FA verification fails, only when regular Auth fails.
Plugin example
package Lemonldap::NG::Portal::Plugins::StoreHistory;
use Mouse;
use Lemonldap::NG::Portal::Main::Constants qw/PE_OK PE_ERROR PE_INFO/;
extends 'Lemonldap::NG::Portal::Main::Plugin';
# Declare when LemonLDAP::NG must call your functions
use constant afterSub => { storeHistory => 'myAfterHistory' };
sub myAfterHistory {
my ($self, $req) = @_;
use Data::Dumper;
$self->logger->debug(Dumper($req->{sessionInfo}));
return 0;
}
1;
Some users want to be able to run custom steps during authentication failure (mostly related to logging/accounting)