Comparison

util/sasl/plain.lua @ 3981:2b0b8fe68df2

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 3179:99c5288a26e4
child 4113:65482a852c4d
comparison
equal deleted inserted replaced
3980:6b2fac6602b3 3981:2b0b8fe68df2
55 end 55 end
56 56
57 local correct, state = false, false; 57 local correct, state = false, false;
58 if self.profile.plain then 58 if self.profile.plain then
59 local correct_password; 59 local correct_password;
60 correct_password, state = self.profile.plain(authentication, self.realm); 60 correct_password, state = self.profile.plain(self, authentication, self.realm);
61 correct = (correct_password == password); 61 correct = (correct_password == password);
62 elseif self.profile.plain_test then 62 elseif self.profile.plain_test then
63 correct, state = self.profile.plain_test(authentication, password, self.realm); 63 correct, state = self.profile.plain_test(self, authentication, password, self.realm);
64 end 64 end
65 65
66 self.username = authentication 66 self.username = authentication
67 if not state then 67 if not state then
68 return "failure", "account-disabled"; 68 return "failure", "account-disabled";