LemonLDAP::NG Web SSO
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemonldap-ng/lemonldap-ng-portal/t/AfterDataCustomPlugin.pm

23 lines
522 B

package t::AfterDataCustomPlugin;
use strict;
use Mouse;
use Lemonldap::NG::Portal::Main::Constants qw(
PE_OK
PE_BADCREDENTIALS
);
extends 'Lemonldap::NG::Portal::Main::Plugin';
use constant afterData => 'BadCredentials';
sub BadCredentials {
my ( $self, $req ) = @_;
my $uid = $self->conf->{customPluginsParams}->{uid};
$self->logger->debug("user=" . $req->user());
$self->logger->debug("Bad credentials required for: $uid");
return $req->user() eq $uid ? PE_BADCREDENTIALS : PE_OK;
}
1;