diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-09-30 17:18:13 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-09-30 17:18:13 +0200 |
commit | b001e7ecf6c0dd204a059afcd25a6a15b7eb52f7 (patch) | |
tree | f676ea5a29c73f4a1dc5bb00d91ce804f96eb227 /mod_auth_custom | |
parent | 9148979197b76102b753635ecad615f25cb61cb1 (diff) | |
download | prosody_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.lua | 38 |
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) | |||
16 | end | 16 | end |
17 | 17 | ||
18 | function test_password(username, password) | 18 | function 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; |
30 | end | ||
31 | |||
32 | function get_sasl_handler() | ||
33 | return new_sasl(module.host, { | ||
34 | plain_test = function(sasl, ...) | ||
35 | return test_password(...) | ||
36 | end | ||
37 | }); | ||
38 | end | 30 | end |
39 | 31 | ||
32 | function get_sasl_handler() | ||
33 | return new_sasl(module.host, { | ||
34 | plain_test = function(sasl, ...) | ||
35 | return test_password(...) | ||
36 | end | ||
37 | }); | ||
38 | end | ||
39 | |||
40 | module:provides"auth"; | 40 | module:provides"auth"; |