See mod_lib_ldap for more information.
You must install mod_lib_ldap to use this module. After that, you need only copy mod_auth_ldap2.lua to your Prosody installation's plugins directory.
In addition to the configuration that mod_lib_ldap itself requires, this plugin also requires the following fields in the ldap section:
See the README.html distributed with mod_lib_ldap for details.