Comparison

core/usermanager.lua @ 2999:9a8f942433c4

usermanager: Give the default auth provider a name, you'll never guess what it is.
author Matthew Wild <mwild1@gmail.com>
date Wed, 05 May 2010 14:17:01 +0100
parent 2987:0acfae4da199
child 3030:2be7801474fb
comparison
equal deleted inserted replaced
2998:36c169ed1576 2999:9a8f942433c4
38 end); 38 end);
39 39
40 local function is_cyrus(host) return config.get(host, "core", "sasl_backend") == "cyrus"; end 40 local function is_cyrus(host) return config.get(host, "core", "sasl_backend") == "cyrus"; end
41 41
42 function new_default_provider(host) 42 function new_default_provider(host)
43 local provider = {}; 43 local provider = { name = "default" };
44 44
45 function provider.test_password(username, password) 45 function provider.test_password(username, password)
46 if is_cyrus(host) then return nil, "Legacy auth not supported with Cyrus SASL."; end 46 if is_cyrus(host) then return nil, "Legacy auth not supported with Cyrus SASL."; end
47 local credentials = datamanager.load(username, host, "accounts") or {}; 47 local credentials = datamanager.load(username, host, "accounts") or {};
48 48