aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-03 17:54:26 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-03 17:54:26 +0000
commit2d4ffda23f29c8517d76ddbb5cf322c04d5bb7db (patch)
treeeba6fd96ea7effc567411403f7aab463e18d176b /plugins/mod_saslauth.lua
parentc1c4425f34850affd90abca04866cb06b1305b76 (diff)
parentbaafc1c47cfcb62a9e452cc9ff20589fd567df50 (diff)
downloadprosody-2d4ffda23f29c8517d76ddbb5cf322c04d5bb7db.tar.gz
prosody-2d4ffda23f29c8517d76ddbb5cf322c04d5bb7db.zip
Merge with Paul
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 92853522..283f5e1d 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -25,7 +25,8 @@ local jid_split = require "util.jid".split
local md5 = require "util.hashes".md5;
local config = require "core.configmanager";
-local secure_auth_only = config.get(module:get_host(), "core", "c2s_require_encryption") or config.get(module:get_host(), "core", "require_encryption");
+local secure_auth_only = module:get_option("c2s_require_encryption") or module:get_option("require_encryption");
+local sasl_backend = module:get_option("sasl_backend") or "builtin";
local log = module._log;
@@ -34,12 +35,13 @@ local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind';
local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas';
local new_sasl
-if config.get(module:get_host(), "core", "cyrus_service_name") then
+if sasl_backend == "cyrus" then
cyrus_new = require "util.sasl_cyrus".new;
new_sasl = function(realm)
- return cyrus_new(realm, config.get(module:get_host(), "core", "cyrus_service_name"))
+ return cyrus_new(realm, module:get_option("cyrus_service_name") or "xmpp")
end
else
+ if sasl_backend ~= "backend" then log("warning", "Unknown SASL backend %s", sasl_backend) end;
new_sasl = require "util.sasl".new;
end