75 else return response end |
75 else return response end |
76 elseif mechanism == "DIGEST-MD5" then |
76 elseif mechanism == "DIGEST-MD5" then |
77 function func(x) return x; end |
77 function func(x) return x; end |
78 local node, domain, realm, decoder = arg[1], arg[2], arg[3], arg[4]; |
78 local node, domain, realm, decoder = arg[1], arg[2], arg[3], arg[4]; |
79 local password = usermanager_get_password(node, domain) |
79 local password = usermanager_get_password(node, domain) |
80 if decoder then node, realm, password = decoder(node), decoder(realm), decoder(password); end |
80 if password then |
81 return func, md5(node..":"..realm..":"..password); |
81 if decoder then node, realm, password = decoder(node), decoder(realm), decoder(password); end |
|
82 return func, md5(node..":"..realm..":"..password); |
|
83 else |
|
84 return func, nil; |
|
85 end |
82 end |
86 end |
83 end |
87 end |
84 |
88 |
85 local function sasl_handler(session, stanza) |
89 local function sasl_handler(session, stanza) |
86 if stanza.name == "auth" then |
90 if stanza.name == "auth" then |