aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-12-22 19:27:19 +0100
committerTobias Markmann <tm@ayena.de>2009-12-22 19:27:19 +0100
commit8d63e6daafef556c779ddc3941805443304e678a (patch)
tree0d90e1c0fb64dad53cc6af152a43ff9d59f9cf20
parentedc52a67f0351e48e1663d12fece2da413d617c5 (diff)
downloadprosody-8d63e6daafef556c779ddc3941805443304e678a.tar.gz
prosody-8d63e6daafef556c779ddc3941805443304e678a.zip
mod_saslauth: Add support for CyrusSASL.
-rw-r--r--plugins/mod_saslauth.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index dd13930e..5398eae5 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -33,7 +33,15 @@ local xmlns_sasl ='urn:ietf:params:xml:ns:xmpp-sasl';
local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind';
local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas';
-local new_sasl = require "util.sasl".new;
+local new_sasl
+if config.get(module:get_host(), "core", "use_cyrus") then
+ cyrus_new = require "util.sasl_cyrus".new;
+ new_sasl = function(realm)
+ return cyrus_new(realm, "prosody")
+ end
+else
+ new_sasl = require "util.sasl".new;
+end
default_authentication_profile = {
plain = function(username, realm)