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(authentication, self.realm); |
61 if correct_password == password then correct = true; else correct = false; end |
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, self.realm, password); |
63 correct, state = self.profile.plain_test(authentication, self.realm, password); |
64 end |
64 end |
65 |
65 |
66 self.username = authentication |
66 self.username = authentication |