Lua scripts to authenticate users using nginx, heavily inspired by http://www.stavros.io/posts/writing-an-nginx-authentication-module-in-lua/#