Software /
code /
prosody
Diff
util/sasl/scram.lua @ 4049:fe6f4a255fd8
util.sasl.*, mod_auth_*, mod_saslauth: Pass SASL handler as first parameter to SASL profile callbacks.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 27 Dec 2010 19:57:04 +0500 |
parent | 3540:bc139431830b |
child | 4113:65482a852c4d |
child | 5828:24de22c01f8d |
line wrap: on
line diff
--- a/util/sasl/scram.lua Mon Dec 27 19:43:57 2010 +0500 +++ b/util/sasl/scram.lua Mon Dec 27 19:57:04 2010 +0500 @@ -143,7 +143,7 @@ -- retreive credentials if self.profile.plain then - local password, state = self.profile.plain(self.state.name, self.realm) + local password, state = self.profile.plain(self, self.state.name, self.realm) if state == nil then return "failure", "not-authorized" elseif state == false then return "failure", "account-disabled" end @@ -163,7 +163,7 @@ return "failure", "temporary-auth-failure"; end elseif self.profile["scram_"..hashprep(hash_name)] then - local stored_key, server_key, iteration_count, salt, state = self.profile["scram_"..hashprep(hash_name)](self.state.name, self.realm); + local stored_key, server_key, iteration_count, salt, state = self.profile["scram_"..hashprep(hash_name)](self, self.state.name, self.realm); if state == nil then return "failure", "not-authorized" elseif state == false then return "failure", "account-disabled" end