summaryrefslogtreecommitdiff
path: root/mod_auth_custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-09-30 17:18:13 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-09-30 17:18:13 +0200
commitb001e7ecf6c0dd204a059afcd25a6a15b7eb52f7 (patch)
treef676ea5a29c73f4a1dc5bb00d91ce804f96eb227 /mod_auth_custom
parent9148979197b76102b753635ecad615f25cb61cb1 (diff)
downloadprosody_auth-b001e7ecf6c0dd204a059afcd25a6a15b7eb52f7.tar
prosody_auth-b001e7ecf6c0dd204a059afcd25a6a15b7eb52f7.tar.gz
prosody_auth-b001e7ecf6c0dd204a059afcd25a6a15b7eb52f7.tar.bz2
prosody_auth-b001e7ecf6c0dd204a059afcd25a6a15b7eb52f7.tar.xz
prosody_auth-b001e7ecf6c0dd204a059afcd25a6a15b7eb52f7.zip
removed some trailing whitespace
Diffstat (limited to 'mod_auth_custom')
-rw-r--r--mod_auth_custom/mod_auth_custom.lua38
1 files changed, 19 insertions, 19 deletions
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)
16end 16end
17 17
18function test_password(username, password) 18function test_password(username, password)
19 local h, err = pam.start("xmpp", username, { 19 local h, err = pam.start("xmpp", username, {
20 function (t) 20 function (t)
21 if #t == 1 and t[1][1] == pam.PAM_PROMPT_ECHO_OFF then 21 if #t == 1 and t[1][1] == pam.PAM_PROMPT_ECHO_OFF then
22 return { { password, 0} }; 22 return { { password, 0} };
23 end 23 end
24 end 24 end
25 }); 25 });
26 if h and h:authenticate() and h:endx(pam.PAM_SUCCESS) then 26 if h and h:authenticate() and h:endx(pam.PAM_SUCCESS) then
27 return true, true; 27 return true, true;
28 end 28 end
29 return nil, true; 29 return nil, true;
30end
31
32function get_sasl_handler()
33 return new_sasl(module.host, {
34 plain_test = function(sasl, ...)
35 return test_password(...)
36 end
37 });
38end 30end
39 31
32function get_sasl_handler()
33 return new_sasl(module.host, {
34 plain_test = function(sasl, ...)
35 return test_password(...)
36 end
37 });
38end
39
40module:provides"auth"; 40module:provides"auth";