aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl_cyrus.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-08-23 16:54:56 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-08-23 16:54:56 +0500
commit373662e4a695ef9d75381173eb4efb439e91d91b (patch)
tree82b3a14bfacbc2e01a2d47570a01d55e2c985eb9 /util/sasl_cyrus.lua
parent06fbe2e85325a81cff5f2ddf816ebaf4925364c6 (diff)
downloadprosody-373662e4a695ef9d75381173eb4efb439e91d91b.tar.gz
prosody-373662e4a695ef9d75381173eb4efb439e91d91b.zip
mod_saslauth, mod_auth_cyrus, util.sasl_cyrus: Moved cyrus account provisioning check out of mod_saslauth.
Diffstat (limited to 'util/sasl_cyrus.lua')
-rw-r--r--util/sasl_cyrus.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/sasl_cyrus.lua b/util/sasl_cyrus.lua
index 3ec8adca..aafd5455 100644
--- a/util/sasl_cyrus.lua
+++ b/util/sasl_cyrus.lua
@@ -143,6 +143,9 @@ function method:process(message)
self.username = cyrussasl.get_username(self.cyrus)
if (err == 0) then -- SASL_OK
+ if self.require_provisioning and not self.require_provisioning(self.username) then
+ return "failure", "not-authorized", "User authenticated successfully, but not provisioned for XMPP";
+ end
return "success", data
elseif (err == 1) then -- SASL_CONTINUE
return "challenge", data