aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Aurich <paul@darkrain42.org>2010-03-17 15:29:14 -0700
committerPaul Aurich <paul@darkrain42.org>2010-03-17 15:29:14 -0700
commit5e9e92c9bf65f45be5e9415e8d895b44a62945fe (patch)
tree66a38c27c8042488afad56e7e32b7a997c00f83f
parenta99005ba14c20a08860a27e5041beccc530be6a1 (diff)
downloadprosody-5e9e92c9bf65f45be5e9415e8d895b44a62945fe.tar.gz
prosody-5e9e92c9bf65f45be5e9415e8d895b44a62945fe.zip
mod_saslauth: Add a sasl_realm option
-rw-r--r--plugins/mod_saslauth.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 0cae5833..1143549a 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -161,10 +161,11 @@ module:hook("stream-features", function(event)
if secure_auth_only and not origin.secure then
return;
end
+ local realm = module:get_option("sasl_realm") or origin.host;
if module:get_option("anonymous_login") then
- origin.sasl_handler = new_sasl(origin.host, anonymous_authentication_profile);
+ origin.sasl_handler = new_sasl(realm, anonymous_authentication_profile);
else
- origin.sasl_handler = new_sasl(origin.host, default_authentication_profile);
+ origin.sasl_handler = new_sasl(realm, default_authentication_profile);
if not (module:get_option("allow_unencrypted_plain_auth")) and not origin.secure then
origin.sasl_handler:forbidden({"PLAIN"});
end