# HG changeset patch # User Senya # Date 1517429727 -7200 # Node ID 94d8960385aada61a1f143d229013e4cd30e501f # Parent 276f7af8afd13189b2242d66f951d7a388a8f4f9 mod_auth_custom_http: Fix json.encode impoper reference diff -r 276f7af8afd1 -r 94d8960385aa mod_auth_custom_http/mod_auth_custom_http.lua --- 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); -