-function new_default_provider(host)
- local provider = { name = "cyrus" };
- log("debug", "initializing default authentication provider for host '%s'", host);
-
- function provider.test_password(username, password)
- return nil, "Legacy auth not supported with Cyrus SASL.";
- end
-
- function provider.get_password(username)
- return nil, "Passwords unavailable for Cyrus SASL.";
+do -- diagnostic
+ local list;
+ for mechanism in pairs(new_sasl(module.host):mechanisms()) do
+ list = (not(list) and mechanism) or (list..", "..mechanism);