From b001e7ecf6c0dd204a059afcd25a6a15b7eb52f7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 30 Sep 2015 17:18:13 +0200 Subject: removed some trailing whitespace --- mod_auth_custom/mod_auth_custom.lua | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'mod_auth_custom/mod_auth_custom.lua') diff --git a/mod_auth_custom/mod_auth_custom.lua b/mod_auth_custom/mod_auth_custom.lua index 9b4872e..811aa57 100644 --- a/mod_auth_custom/mod_auth_custom.lua +++ b/mod_auth_custom/mod_auth_custom.lua @@ -16,25 +16,25 @@ function user_exists(username) end function test_password(username, password) - local h, err = pam.start("xmpp", username, { - function (t) - if #t == 1 and t[1][1] == pam.PAM_PROMPT_ECHO_OFF then - return { { password, 0} }; - end - end - }); - if h and h:authenticate() and h:endx(pam.PAM_SUCCESS) then - return true, true; - end - return nil, true; -end - -function get_sasl_handler() - return new_sasl(module.host, { - plain_test = function(sasl, ...) - return test_password(...) - end - }); + local h, err = pam.start("xmpp", username, { + function (t) + if #t == 1 and t[1][1] == pam.PAM_PROMPT_ECHO_OFF then + return { { password, 0} }; + end + end + }); + if h and h:authenticate() and h:endx(pam.PAM_SUCCESS) then + return true, true; + end + return nil, true; end +function get_sasl_handler() + return new_sasl(module.host, { + plain_test = function(sasl, ...) + return test_password(...) + end + }); +end + module:provides"auth"; -- cgit v1.2.3