# HG changeset patch # User Kim Alvefur # Date 1517144222 -3600 # Node ID 7bfb25111ea617cf7c1a9012f818c81717481e99 # Parent 13f381f0c03ff340b46b4908bc23cb7744e56612 mod_s2s_auth_posh: Normalize code formatting diff -r 13f381f0c03f -r 7bfb25111ea6 mod_s2s_auth_posh/mod_s2s_auth_posh.lua --- a/mod_s2s_auth_posh/mod_s2s_auth_posh.lua Thu Dec 21 03:23:58 2017 +0100 +++ b/mod_s2s_auth_posh/mod_s2s_auth_posh.lua Sun Jan 28 13:57:02 2018 +0100 @@ -5,14 +5,14 @@ -- http://tools.ietf.org/html/draft-miller-posh-03 -- module:set_global(); -local json = require 'util.json' +local json = require "util.json"; -local base64 = require"util.encodings".base64; +local base64 = require "util.encodings".base64; local pem2der = require "util.x509".pem2der; -local hashes = require"util.hashes"; -local build_url = require"socket.url".build; +local hashes = require "util.hashes"; +local build_url = require "socket.url".build; local async = require "util.async"; -local http = require"net.http"; +local http = require "net.http"; local cache = require "util.cache".new(100); @@ -46,7 +46,7 @@ local url = build_url { scheme = "https", host = target_host, path = "/.well-known/posh/xmpp-server.json" }; log("debug", "Request POSH information for %s", tostring(target_host)); - http.request(url, nil, function(response, code) + http.request(url, nil, function (response, code) if code ~= 200 then log("debug", "No or invalid POSH response received"); resume(); @@ -69,7 +69,7 @@ end -- Do POSH authentication -module:hook("s2s-check-certificate", function(event) +module:hook("s2s-check-certificate", function (event) local session, cert = event.session, event.cert; local log = session.log or module._log; if session.cert_identity_status == "valid" then