Comparison

plugins/mod_saslauth.lua @ 2391:521de84113da

mod_saslauth: Make service_name configurable for CyrusSASL users.
author Tobias Markmann <tm@ayena.de>
date Tue, 22 Dec 2009 20:20:37 +0100
parent 2390:4f8f9dfa22ac
child 2395:7d7618c21321
comparison
equal deleted inserted replaced
2390:4f8f9dfa22ac 2391:521de84113da
32 local xmlns_sasl ='urn:ietf:params:xml:ns:xmpp-sasl'; 32 local xmlns_sasl ='urn:ietf:params:xml:ns:xmpp-sasl';
33 local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind'; 33 local xmlns_bind ='urn:ietf:params:xml:ns:xmpp-bind';
34 local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas'; 34 local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas';
35 35
36 local new_sasl 36 local new_sasl
37 if config.get(module:get_host(), "core", "use_cyrus") then 37 if config.get(module:get_host(), "core", "cyrus_service_name") then
38 cyrus_new = require "util.sasl_cyrus".new; 38 cyrus_new = require "util.sasl_cyrus".new;
39 new_sasl = function(realm) 39 new_sasl = function(realm)
40 return cyrus_new(realm, "prosody") 40 return cyrus_new(realm, config.get(module:get_host(), "core", "cyrus_service_name"))
41 end 41 end
42 else 42 else
43 new_sasl = require "util.sasl".new; 43 new_sasl = require "util.sasl".new;
44 end 44 end
45 45