Comparison

plugins/mod_legacyauth.lua @ 3217:382f70627ff9

mod_legacyauth: Use the new usermanager.test_password instead of usermanager.validate_credentials.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 09 Jun 2010 22:20:53 +0500
parent 2925:692b3c6c5bd2
child 3222:d0525df563c0
comparison
equal deleted inserted replaced
3216:d4d0519cd0c1 3217:382f70627ff9
48 else 48 else
49 username, password, resource = t_concat(username), t_concat(password), t_concat(resource); 49 username, password, resource = t_concat(username), t_concat(password), t_concat(resource);
50 username = nodeprep(username); 50 username = nodeprep(username);
51 resource = resourceprep(resource) 51 resource = resourceprep(resource)
52 local reply = st.reply(stanza); 52 local reply = st.reply(stanza);
53 if usermanager.validate_credentials(session.host, username, password) then 53 if usermanager.test_password(session.host, username, password) then
54 -- Authentication successful! 54 -- Authentication successful!
55 local success, err = sessionmanager.make_authenticated(session, username); 55 local success, err = sessionmanager.make_authenticated(session, username);
56 if success then 56 if success then
57 local err_type, err_msg; 57 local err_type, err_msg;
58 success, err_type, err, err_msg = sessionmanager.bind_resource(session, resource); 58 success, err_type, err, err_msg = sessionmanager.bind_resource(session, resource);