Comparison

util/sasl_cyrus.lua @ 3468:d50e2c937717

mod_saslauth, mod_auth_cyrus, util.sasl_cyrus: Moved cyrus account provisioning check out of mod_saslauth.
author Waqas Hussain <waqas20@gmail.com>
date Mon, 23 Aug 2010 16:54:56 +0500
parent 3467:c9f4c3aa14a1
child 3549:395d5bb5266e
comparison
equal deleted inserted replaced
3467:c9f4c3aa14a1 3468:d50e2c937717
141 end 141 end
142 142
143 self.username = cyrussasl.get_username(self.cyrus) 143 self.username = cyrussasl.get_username(self.cyrus)
144 144
145 if (err == 0) then -- SASL_OK 145 if (err == 0) then -- SASL_OK
146 if self.require_provisioning and not self.require_provisioning(self.username) then
147 return "failure", "not-authorized", "User authenticated successfully, but not provisioned for XMPP";
148 end
146 return "success", data 149 return "success", data
147 elseif (err == 1) then -- SASL_CONTINUE 150 elseif (err == 1) then -- SASL_CONTINUE
148 return "challenge", data 151 return "challenge", data
149 elseif (err == -4) then -- SASL_NOMECH 152 elseif (err == -4) then -- SASL_NOMECH
150 log("debug", "SASL mechanism not available from remote end") 153 log("debug", "SASL mechanism not available from remote end")