Software /
code /
prosody
Changeset
2390:4f8f9dfa22ac
mod_saslauth: Add support for CyrusSASL.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Tue, 22 Dec 2009 19:27:19 +0100 |
parents | 2389:8f6526da4757 |
children | 2391:521de84113da |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Tue Dec 22 19:26:16 2009 +0100 +++ b/plugins/mod_saslauth.lua Tue Dec 22 19:27:19 2009 +0100 @@ -33,7 +33,15 @@ 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)