Mercurial > prosody-modules
comparison mod_auth_ldap2/mod_auth_ldap.lua @ 831:0c3638673464
Merge upstream with my local LDAP work
author | Rob Hoelz <rob@hoelz.ro> |
---|---|
date | Tue, 18 Sep 2012 00:31:42 +0200 |
parents | 881ec9919144 |
children |
comparison
equal
deleted
inserted
replaced
830:f160166612c2 | 831:0c3638673464 |
---|---|
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); |