Apache2-AuthenMSAD

 view release on metacpan or  search on metacpan

AuthenMSAD.pm  view on Meta::CPAN

      return Apache2::Const::HTTP_UNAUTHORIZED;
   }

   my $ldap = Net::LDAP->new($server, version=>3);
   unless ($ldap) {
      $r->note_basic_auth_failure;
      $r->log_reason("user - MSAD LDAP Connect Failed",$r->uri);
      return Apache2::Const::HTTP_UNAUTHORIZED;
   }

   my $result= $ldap->bind (dn => "$user\@$domain", password => $pass);
   if (!$result || ($result && $result->code)) {
      $r->note_basic_auth_failure;
      $r->log_reason("user - Active Directory Authen Failed",$r->uri);
      return Apache2::Const::HTTP_UNAUTHORIZED;
   }

   return Apache2::Const::OK;
}


README  view on Meta::CPAN

$Id: README,v 1.8 2005/10/21 18:07:33 reggers Exp $

This module, Apache2::AuthenMSAD, is an Apache2/mod_perl2 authentication
handler to authenticate users using a Microsoft Active Directory
server. Authentication is an LDAP bind to the user's UserPrincipal name --
"$user\@$domain" (that's the "Kerberos" name, you can do the same bind to
"$domain\\$user")

To build and install it, please run

    perl Makefile.PL
    make
    make test
    make install

To read more about this module try



( run in 4.114 seconds using v1.01-cache-2.11-cpan-2398b32b56e )