74 if is_cyrus(host) then return nil, "Account creation/modification not available with Cyrus SASL."; end |
74 if is_cyrus(host) then return nil, "Account creation/modification not available with Cyrus SASL."; end |
75 return datamanager.store(username, host, "accounts", {password = password}); |
75 return datamanager.store(username, host, "accounts", {password = password}); |
76 end |
76 end |
77 |
77 |
78 function provider.get_sasl_handler() |
78 function provider.get_sasl_handler() |
79 local realm = module:get_option("sasl_realm") or origin.host; |
79 local realm = module:get_option("sasl_realm") or module.host; |
80 local getpass_authentication_profile = { |
80 local getpass_authentication_profile = { |
81 plain = function(username, realm) |
81 plain = function(username, realm) |
82 local prepped_username = nodeprep(username); |
82 local prepped_username = nodeprep(username); |
83 if not prepped_username then |
83 if not prepped_username then |
84 log("debug", "NODEprep failed on username: %s", username); |
84 log("debug", "NODEprep failed on username: %s", username); |