# HG changeset patch # User Kim Alvefur # Date 1376172058 -7200 # Node ID bd88728b0d954bc046875cc77790393549d813a1 # Parent 27de4109b7e9864d3a5f2f2ed06cecde88da9099 mod_auth_dovecot: Add a proper SASL handler method diff -r 27de4109b7e9 -r bd88728b0d95 mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua --- a/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua Sun Oct 13 04:47:51 2013 +0200 +++ b/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua Sun Aug 11 00:00:58 2013 +0200 @@ -88,7 +88,13 @@ return new_sasl(module.host):plain_test(username .. "@".. (service_realm or module.host), password); end - provider.get_sasl_handler = nil + function provider.get_sasl_handler() + return util_sasl_new(module.host, { + plain_test = function(sasl, username, password, realm) + return provider.test_password(username, password), true + end; + }); + end end module:provides("auth", provider);