Software /
code /
prosody
Comparison
util/sasl/digest-md5.lua @ 2191:e79c0ce6cf54 sasl
Adding support for digest-md5 profile in DIGEST-MD5 implementation.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Fri, 13 Nov 2009 11:24:22 +0100 |
parent | 2189:1182e7ae2964 |
child | 2192:fa46d158c95f |
comparison
equal
deleted
inserted
replaced
2190:9657276387af | 2191:e79c0ce6cf54 |
---|---|
173 local password, state = self.profile.plain(response["username"], self.realm) | 173 local password, state = self.profile.plain(response["username"], self.realm) |
174 if state == nil then return "failure", "not-authorized" | 174 if state == nil then return "failure", "not-authorized" |
175 elseif state == false then return "failure", "account-disabled" end | 175 elseif state == false then return "failure", "account-disabled" end |
176 Y = md5(response["username"]..":"..response["realm"]..":"..password); | 176 Y = md5(response["username"]..":"..response["realm"]..":"..password); |
177 elseif self.profile["digest-md5"] then | 177 elseif self.profile["digest-md5"] then |
178 --local Y, state = self.profile["digest-md5"](response["username"], self.realm, response["charset"]) | 178 local Y, state = self.profile["digest-md5"](response["username"], self.realm, response["realm"] response["charset"]) |
179 if state == nil then return "failure", "not-authorized" | |
180 elseif state == false then return "failure", "account-disabled" end | |
179 elseif self.profile["digest-md5-test"] then | 181 elseif self.profile["digest-md5-test"] then |
180 -- TODO | 182 -- TODO |
181 end | 183 end |
182 --local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder); | 184 --local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder); |
183 --if Y == nil then return "failure", "not-authorized" | 185 --if Y == nil then return "failure", "not-authorized" |