Mercurial > prosody-modules
diff mod_s2s_auth_posh/mod_s2s_auth_posh.lua @ 3205:7bfb25111ea6
mod_s2s_auth_posh: Normalize code formatting
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 28 Jan 2018 13:57:02 +0100 |
parents | 13f381f0c03f |
children | 517c7f0333e3 |
line wrap: on
line diff
--- 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