Comparison

mod_auth_wordpress/mod_auth_wordpress.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
174 if #hash == 34 then return hash; end 174 if #hash == 34 then return hash; end
175 return md5(password, true); 175 return md5(password, true);
176 end 176 end
177 177
178 178
179 provider = { name = "wordpress" }; 179 provider = {};
180 180
181 function provider.test_password(username, password) 181 function provider.test_password(username, password)
182 local hash = get_password(username); 182 local hash = get_password(username);
183 return hash and wordpressCheckHash(password, hash); 183 return hash and wordpressCheckHash(password, hash);
184 end 184 end
248 return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent."; 248 return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent.";
249 end 249 end
250 return sasl; 250 return sasl;
251 end 251 end
252 252
253 module:add_item("auth-provider", provider); 253 module:provides("auth", provider);
254 254