Small implementation of HTTP Digest Authentication (client-side) in Lua that mimics the API of LuaSocket.
Only supports auth/MD5, no reuse of client nonce, pull requests welcome.
http.request. Credentials must be contained in the URL. Both the simple and
generic interface are supported. Here is an example with the simple interface:
local http_digest = require "http-digest" local url = "http://user:email@example.com/digest-auth/auth/user/passwd" local b, c, h = http_digest.request(url)
See the tests for more.
If you get this error when running the tests, update LuaSocket:
variable 'PROXY' is not declared
You may need to use the SCM version to run them (see this issue).
This only impacts the tests, the code itself works with older versions as well.
- Copyright (c) 2012-2013 Moodstocks SAS
- Copyright (c) 2014-2018 Pierre Chapuis