diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-12-27 19:57:04 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-12-27 19:57:04 +0500 |
commit | aa144af70e8b56d9d5a31de752e502aabb074fa0 (patch) | |
tree | 1f52b81f322f1d9046be7a2135eba8fc3f908221 /util/sasl/scram.lua | |
parent | a4d4abfeb78ff6e1de6d669679e78b6c88ed77e1 (diff) | |
download | prosody-aa144af70e8b56d9d5a31de752e502aabb074fa0.tar.gz prosody-aa144af70e8b56d9d5a31de752e502aabb074fa0.zip |
util.sasl.*, mod_auth_*, mod_saslauth: Pass SASL handler as first parameter to SASL profile callbacks.
Diffstat (limited to 'util/sasl/scram.lua')
-rw-r--r-- | util/sasl/scram.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua index c846a7d1..530ef5a0 100644 --- a/util/sasl/scram.lua +++ b/util/sasl/scram.lua @@ -143,7 +143,7 @@ local function scram_gen(hash_name, H_f, HMAC_f) -- 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 @@ local function scram_gen(hash_name, H_f, HMAC_f) 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 |