Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 48:d0505310aec5
Use xmlns for matching auth tag too
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 04 Oct 2008 02:42:23 +0100 |
parent | 46:d6b3f9dbb624 |
child | 52:93e468eb2ffb |
comparison
equal
deleted
inserted
replaced
47:33ed4c6ac249 | 48:d0505310aec5 |
---|---|
14 local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas'; | 14 local xmlns_stanzas ='urn:ietf:params:xml:ns:xmpp-stanzas'; |
15 | 15 |
16 local new_connhandler = require "net.connhandlers".new; | 16 local new_connhandler = require "net.connhandlers".new; |
17 local new_sasl = require "util.sasl".new; | 17 local new_sasl = require "util.sasl".new; |
18 | 18 |
19 add_handler("c2s_unauthed", "auth", | 19 add_handler("c2s_unauthed", "auth", xmlns_sasl, |
20 function (session, stanza) | 20 function (session, stanza) |
21 if not session.sasl_handler then | 21 if not session.sasl_handler then |
22 session.sasl_handler = new_sasl(stanza.attr.mechanism, | 22 session.sasl_handler = new_sasl(stanza.attr.mechanism, |
23 function (username, password) | 23 function (username, password) |
24 -- onAuth | 24 -- onAuth |