aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-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