Dancer2-Plugin-Auth-Extensible-Provider-LDAP
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/Auth/Extensible/Provider/LDAP.pm view on Meta::CPAN
# to anonymously bind.
my $mesg;
if( !defined $username && !defined $password ) {
$self->plugin->app->log( debug => "Binding to LDAP anonymously" );
$mesg = $ldap->bind;
}
else {
croak "username and password must be defined"
unless defined $username && defined $password;
$self->plugin->app->log( debug => "Binding to LDAP with credentials" );
$mesg = $ldap->bind( $username, password => $password );
}
return $mesg;
}
=head1 METHODS
=head2 authenticate_user $username, $password
( run in 0.243 second using v1.01-cache-2.11-cpan-4d50c553e7e )