Mercurial > prosody-modules
comparison mod_auth_http_async/mod_auth_http_async.lua @ 2442:b2a198665946
mod_auth_http_async: Log URL when testing password
| author | JC Brand <jc@opkode.com> |
|---|---|
| date | Thu, 12 Jan 2017 10:13:58 +0000 |
| parents | 5e8dec076afc |
| children | a11568bfaf4c |
comparison
equal
deleted
inserted
replaced
| 2441:68ebc52222dc | 2442:b2a198665946 |
|---|---|
| 31 end | 31 end |
| 32 | 32 |
| 33 local provider = {}; | 33 local provider = {}; |
| 34 | 34 |
| 35 function provider.test_password(username, password) | 35 function provider.test_password(username, password) |
| 36 log("debug", "test password for user %s at host %s", username, host); | |
| 37 local url = api_base:gsub("$user", username); | 36 local url = api_base:gsub("$user", username); |
| 37 log("debug", "Testing password for user %s at host %s with URL %s", username, host, url); | |
| 38 local ex = { | 38 local ex = { |
| 39 headers = { Authorization = "Basic "..base64(username..":"..password); }; | 39 headers = { Authorization = "Basic "..base64(username..":"..password); }; |
| 40 } | 40 } |
| 41 if (have_async) then | 41 if (have_async) then |
| 42 local _, code = async_http_request(url, ex); | 42 local _, code = async_http_request(url, ex); |
