196 return "failure", "malformed-request", "Missing entry for digest-uri in SASL message." |
196 return "failure", "malformed-request", "Missing entry for digest-uri in SASL message." |
197 end |
197 end |
198 |
198 |
199 --TODO maybe realm support |
199 --TODO maybe realm support |
200 self.username = response["username"]; |
200 self.username = response["username"]; |
201 local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], to_unicode(domain), response["realm"], decoder); |
201 local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder); |
202 if Y == nil then return "failure", "not-authorized" |
202 if Y == nil then return "failure", "not-authorized" |
203 elseif Y == false then return "failure", "account-disabled" end |
203 elseif Y == false then return "failure", "account-disabled" end |
204 local A1 = ""; |
204 local A1 = ""; |
205 if response.authzid then |
205 if response.authzid then |
206 if response.authzid == self.username.."@"..self.realm then |
206 if response.authzid == self.username.."@"..self.realm then |