comparison mod_auth_dovecot/mod_auth_dovecot.lua @ 305:4c3abf1a9b5a

mod_auth_*, mod_saslauth_muc: Update SASL callbacks to take SASL handler as first argument.
author Waqas Hussain <waqas20@gmail.com>
date Mon, 27 Dec 2010 20:15:21 +0500
parents cda4855863af
children b3bcd1913c85
comparison
equal deleted inserted replaced
304:8f3499ae1e27 305:4c3abf1a9b5a
208 end 208 end
209 209
210 function provider.get_sasl_handler() 210 function provider.get_sasl_handler()
211 local realm = module:get_option("sasl_realm") or module.host; 211 local realm = module:get_option("sasl_realm") or module.host;
212 local getpass_authentication_profile = { 212 local getpass_authentication_profile = {
213 plain_test = function(username, password, realm) 213 plain_test = function(sasl, username, password, realm)
214 local prepped_username = nodeprep(username); 214 local prepped_username = nodeprep(username);
215 if not prepped_username then 215 if not prepped_username then
216 log("debug", "NODEprep failed on username: %s", username); 216 log("debug", "NODEprep failed on username: %s", username);
217 return "", nil; 217 return "", nil;
218 end 218 end