Software /
code /
prosody
Changeset
1638:6fd0c2f46b21
mod_saslauth: Fix indentation
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 05 Aug 2009 16:35:13 +0100 |
parents | 1637:c1292624f991 |
children | 1639:0914d128c55e |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Wed Aug 05 16:31:56 2009 +0100 +++ b/plugins/mod_saslauth.lua Wed Aug 05 16:35:13 2009 +0100 @@ -68,22 +68,22 @@ 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)