aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-08-05 16:35:13 +0100
committerMatthew Wild <mwild1@gmail.com>2009-08-05 16:35:13 +0100
commitd6efe651217605deb31fa9f39a5624d285a8e000 (patch)
treea4132125bf880f7d364a44854be1644c289d32da /plugins
parent43ff43e5943fc34a86348f138ce01e5e24da3f67 (diff)
downloadprosody-d6efe651217605deb31fa9f39a5624d285a8e000.tar.gz
prosody-d6efe651217605deb31fa9f39a5624d285a8e000.zip
mod_saslauth: Fix indentation
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_saslauth.lua32
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 9082d69d..48593031 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -68,22 +68,22 @@ local function handle_status(session, status)
end
local function credentials_callback(mechanism, ...)
- if mechanism == "PLAIN" then
- local username, hostname, password = arg[1], arg[2], arg[3];
- local response = usermanager_validate_credentials(hostname, username, password, mechanism)
- if response == nil then return false
- else return response end
- elseif mechanism == "DIGEST-MD5" then
- function func(x) return x; end
- local node, domain, realm, decoder = arg[1], arg[2], arg[3], arg[4];
- local password = usermanager_get_password(node, domain)
- if password then
- if decoder then node, realm, password = decoder(node), decoder(realm), decoder(password); end
- return func, md5(node..":"..realm..":"..password);
- else
- return func, nil;
- end
- end
+ if mechanism == "PLAIN" then
+ local username, hostname, password = arg[1], arg[2], arg[3];
+ local response = usermanager_validate_credentials(hostname, username, password, mechanism)
+ if response == nil then return false
+ else return response end
+ elseif mechanism == "DIGEST-MD5" then
+ function func(x) return x; end
+ local node, domain, realm, decoder = arg[1], arg[2], arg[3], arg[4];
+ local password = usermanager_get_password(node, domain)
+ if password then
+ if decoder then node, realm, password = decoder(node), decoder(realm), decoder(password); end
+ return func, md5(node..":"..realm..":"..password);
+ else
+ return func, nil;
+ end
+ end
end
local function sasl_handler(session, stanza)