Mercurial > prosody-modules
comparison mod_auth_ldap2/mod_auth_ldap.lua @ 814:881ec9919144
mod_auth_*: Use module:provides(), and don't explicitly specify provider.name.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Thu, 13 Sep 2012 00:08:29 +0500 |
| parents | 1d51c5e38faa |
| children |
comparison
equal
deleted
inserted
replaced
| 813:2469f779b3f7 | 814:881ec9919144 |
|---|---|
| 18 | 18 |
| 19 if not ldap then | 19 if not ldap then |
| 20 return; | 20 return; |
| 21 end | 21 end |
| 22 | 22 |
| 23 local provider = { name = 'ldap' } | 23 local provider = {} |
| 24 | 24 |
| 25 function provider.test_password(username, password) | 25 function provider.test_password(username, password) |
| 26 return ldap.bind(username, password); | 26 return ldap.bind(username, password); |
| 27 end | 27 end |
| 28 | 28 |
| 79 base = admin_config.basedn, | 79 base = admin_config.basedn, |
| 80 filter = filter, | 80 filter = filter, |
| 81 }; | 81 }; |
| 82 end | 82 end |
| 83 | 83 |
| 84 module:add_item("auth-provider", provider); | 84 module:provides("auth", provider); |
