Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 3363:a4bb658d3fcb
SASL: Simplified sasl_handler:mechanisms() to return a set, and not an array.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 14 Jul 2010 19:56:57 +0500 |
parent | 3350:f0e312c9da01 |
child | 3385:192ffdaef491 |
comparison
equal
deleted
inserted
replaced
3362:90bf162303f3 | 3363:a4bb658d3fcb |
---|---|
173 if not (module:get_option("allow_unencrypted_plain_auth")) and not origin.secure then | 173 if not (module:get_option("allow_unencrypted_plain_auth")) and not origin.secure then |
174 origin.sasl_handler:forbidden({"PLAIN"}); | 174 origin.sasl_handler:forbidden({"PLAIN"}); |
175 end | 175 end |
176 end | 176 end |
177 features:tag("mechanisms", mechanisms_attr); | 177 features:tag("mechanisms", mechanisms_attr); |
178 for k, v in pairs(origin.sasl_handler:mechanisms()) do | 178 for k in pairs(origin.sasl_handler:mechanisms()) do |
179 features:tag("mechanism"):text(v):up(); | 179 features:tag("mechanism"):text(k):up(); |
180 end | 180 end |
181 features:up(); | 181 features:up(); |
182 else | 182 else |
183 features:tag("bind", bind_attr):tag("required"):up():up(); | 183 features:tag("bind", bind_attr):tag("required"):up():up(); |
184 features:tag("session", xmpp_session_attr):tag("optional"):up():up(); | 184 features:tag("session", xmpp_session_attr):tag("optional"):up():up(); |