plugins/mod_saslauth.lua
changeset 6496 4e51b5e81bdd
parent 6495 0d07fdc07d8c
child 6520 e733e98a348a
equal deleted inserted replaced
6495:0d07fdc07d8c 6496:4e51b5e81bdd
    16 local usermanager_get_sasl_handler = require "core.usermanager".get_sasl_handler;
    16 local usermanager_get_sasl_handler = require "core.usermanager".get_sasl_handler;
    17 local tostring = tostring;
    17 local tostring = tostring;
    18 
    18 
    19 local secure_auth_only = module:get_option_boolean("c2s_require_encryption", module:get_option_boolean("require_encryption", false));
    19 local secure_auth_only = module:get_option_boolean("c2s_require_encryption", module:get_option_boolean("require_encryption", false));
    20 local allow_unencrypted_plain_auth = module:get_option_boolean("allow_unencrypted_plain_auth", false)
    20 local allow_unencrypted_plain_auth = module:get_option_boolean("allow_unencrypted_plain_auth", false)
    21 local insecure_mechanisms = module:get_option_set("allow_unencrypted_sasl", allow_unencrypted_plain_auth and {} or {"PLAIN", "LOGIN"});
    21 local insecure_mechanisms = module:get_option_set("insecure_sasl_mechanisms", allow_unencrypted_plain_auth and {} or {"PLAIN", "LOGIN"});
    22 local disabled_mechanisms = module:get_option_set("disable_sasl_mechanisms", {});
    22 local disabled_mechanisms = module:get_option_set("disable_sasl_mechanisms", {});
    23 
    23 
    24 local log = module._log;
    24 local log = module._log;
    25 
    25 
    26 local xmlns_sasl ='urn:ietf:params:xml:ns:xmpp-sasl';
    26 local xmlns_sasl ='urn:ietf:params:xml:ns:xmpp-sasl';