X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_auth_anonymous.lua;h=8de46f8c27a32bc870c65f60eb9d60f82328c5ff;hb=73e841ddd082009e3f19502b207231bbddfa0dbb;hp=c27057be2fb01e89f44d0cdf1fba5ffc9f69e3f7;hpb=a2072ac03a7e3aea58d4632fa3b12034bb8e781d;p=prosody.git diff --git a/plugins/mod_auth_anonymous.lua b/plugins/mod_auth_anonymous.lua index c27057be..8de46f8c 100644 --- a/plugins/mod_auth_anonymous.lua +++ b/plugins/mod_auth_anonymous.lua @@ -8,6 +8,7 @@ local new_sasl = require "util.sasl".new; local datamanager = require "util.datamanager"; +local hosts = prosody.hosts; -- define auth provider local provider = {}; @@ -41,6 +42,10 @@ function provider.get_sasl_handler() return new_sasl(module.host, anonymous_authentication_profile); end +function provider.users() + return next, hosts[module.host].sessions, nil; +end + -- datamanager callback to disable writes local function dm_callback(username, host, datastore, data) if host == module.host then