and search for LDAP, specficlly Net::LDAP. Then I think we need to address your needs quote
, this should be simple to do with the use of the LDAP PM just take the values that are given from the auth prompt and pass those to the module and attempt to bind as that user if your return a true then you are golden else we know the user doesn't exsist. This is very simple to do and there are plenty of examples on this site just