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

24 lines
521 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};
4 years ago
$self->logger->debug( "user=" . $req->user() );
$self->logger->debug("Bad credentials required for: $uid");
4 years ago
return $req->user() eq $uid ? PE_BADCREDENTIALS : PE_OK;
}
4 years ago
1;