Comparison

mod_auth_phpbb3/mod_auth_phpbb3.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
parent 814:881ec9919144
child 1343:7dbde05b48a9
comparison
equal deleted inserted replaced
830:f160166612c2 831:0c3638673464
185 if #hash == 34 then return hash; end 185 if #hash == 34 then return hash; end
186 return md5(password, true); 186 return md5(password, true);
187 end 187 end
188 188
189 189
190 provider = { name = "phpbb3" }; 190 provider = {};
191 191
192 function provider.test_password(username, password) 192 function provider.test_password(username, password)
193 local hash = get_password(username); 193 local hash = get_password(username);
194 return hash and phpbbCheckHash(password, hash); 194 return hash and phpbbCheckHash(password, hash);
195 end 195 end
267 return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent."; 267 return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent.";
268 end 268 end
269 return sasl; 269 return sasl;
270 end 270 end
271 271
272 module:add_item("auth-provider", provider); 272 module:provides("auth", provider);
273 273