Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 2390:4f8f9dfa22ac
mod_saslauth: Add support for CyrusSASL.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Tue, 22 Dec 2009 19:27:19 +0100 |
parent | 2388:4768879d3591 |
child | 2391:521de84113da |
comparison
equal
deleted
inserted
replaced
2389:8f6526da4757 | 2390:4f8f9dfa22ac |
---|---|
31 | 31 |
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 = require "util.sasl".new; | 36 local new_sasl |
37 if config.get(module:get_host(), "core", "use_cyrus") then | |
38 cyrus_new = require "util.sasl_cyrus".new; | |
39 new_sasl = function(realm) | |
40 return cyrus_new(realm, "prosody") | |
41 end | |
42 else | |
43 new_sasl = require "util.sasl".new; | |
44 end | |
37 | 45 |
38 default_authentication_profile = { | 46 default_authentication_profile = { |
39 plain = function(username, realm) | 47 plain = function(username, realm) |
40 local prepped_username = nodeprep(username); | 48 local prepped_username = nodeprep(username); |
41 if not prepped_username then | 49 if not prepped_username then |