auth0 / nginx-jwt

Lua script for Nginx that performs reverse proxy auth using JWT's
MIT License
535 stars 127 forks source link

Luarocks Support #62

Open mrrobby opened 7 years ago

mrrobby commented 7 years ago

Is there any chance you'll be adding support for a luarocks install (i.e. rockspec)?

twistedstream commented 7 years ago

Hi Rob, if I recall one reason why we didn't attempt to package this library up as a rockspec was that the handful of libraries it depends on were also not registered in LuaRocks. So we would have had to either bundle them directly into one package or ideally get those other libraries into LuaRocks first and reference them as dependencies. The short answer is that it wasn't exactly on the roadmap but I'm sure we'd consider a PR that makes it work.

mrrobby commented 7 years ago

@twistedstream I noticed today that OpenResty has deprecated its usage of LuaRocks in favor of their new package manager OPM. Having said that, I was able to track down the packages used which are published on LuaRocks, that being basexx and lua-resty-jwt. The latter uses it's own fork of an hmac library, which gets packaged if you install using LuaRocks. The problem is the file here nginx-jwt.lua depends on a version of lua-resty-jwt which is not published. There have been code breaking updates since then, so perhaps that would be a first step, to update nginx-jwt.lua to work with lua-resty-jwt v1.0.7? It might jumpstart the desire get the other two libraries on OPM too.