--- a/mod_auth_custom_http/mod_auth_custom_http.lua Tue Jan 30 20:04:55 2018 +0100
+++ b/mod_auth_custom_http/mod_auth_custom_http.lua Wed Jan 31 22:15:27 2018 +0200
@@ -6,7 +6,7 @@
--
local new_sasl = require "util.sasl".new;
-local json_encode = require "util.json";
+local json = require "util.json";
local http = require "socket.http";
local options = module:get_option("auth_custom_http");
@@ -42,7 +42,7 @@
function provider.get_sasl_handler()
local getpass_authentication_profile = {
plain_test = function(sasl, username, password, realm)
- local postdata = json_encode({ username = username, password = password });
+ local postdata = json.encode({ username = username, password = password });
local result = http.request(post_url, postdata);
return result == "true", true;
end,
@@ -52,4 +52,3 @@
module:provides("auth", provider);
-