Software /
code /
prosody-modules
Changeset
2867:94d8960385aa
mod_auth_custom_http: Fix json.encode impoper reference
author | Senya <senya@kinetiksoft.com> |
---|---|
date | Wed, 31 Jan 2018 22:15:27 +0200 |
parents | 2866:276f7af8afd1 |
children | 2868:f90cf59bee8e |
files | mod_auth_custom_http/mod_auth_custom_http.lua |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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); -