Software /
code /
prosody
Comparison
util/sasl_cyrus.lua @ 3467:c9f4c3aa14a1
util.sasl_cyrus: Spaces -> tabs.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 23 Aug 2010 16:42:27 +0500 |
parent | 3443:1159e007cc8f |
child | 3468:d50e2c937717 |
comparison
equal
deleted
inserted
replaced
3466:4add4f9ca409 | 3467:c9f4c3aa14a1 |
---|---|
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 return "success", data | 146 return "success", data |
147 elseif (err == 1) then -- SASL_CONTINUE | 147 elseif (err == 1) then -- SASL_CONTINUE |
148 return "challenge", data | 148 return "challenge", data |
149 elseif (err == -4) then -- SASL_NOMECH | 149 elseif (err == -4) then -- SASL_NOMECH |
150 log("debug", "SASL mechanism not available from remote end") | 150 log("debug", "SASL mechanism not available from remote end") |
151 return "failure", "invalid-mechanism", "SASL mechanism not available" | 151 return "failure", "invalid-mechanism", "SASL mechanism not available" |
152 elseif (err == -13) then -- SASL_BADAUTH | 152 elseif (err == -13) then -- SASL_BADAUTH |
153 return "failure", "not-authorized", sasl_errstring[err]; | 153 return "failure", "not-authorized", sasl_errstring[err]; |
154 else | 154 else |
155 log("debug", "Got SASL error condition %d: %s", err, sasl_errstring[err]); | 155 log("debug", "Got SASL error condition %d: %s", err, sasl_errstring[err]); |
156 return "failure", "undefined-condition", sasl_errstring[err]; | 156 return "failure", "undefined-condition", sasl_errstring[err]; |
157 end | 157 end |
158 end | 158 end |
159 | 159 |
160 return _M; | 160 return _M; |