Lua OpenResty JWT > Debugging log


To install JWT extension:

opm get SkyLothar/lua-resty-jwt

To print debug message in your Lua script:

local jwt = require "resty.jwt"
local jwt_obj = jwt:verify(ngx.var.jwtKey, accessTkn)
for k, v in pairs(jwt_obj) do
    ngx.log(ngx.ERR, "k=" .. k)
    if type(v) ~= "table" then
        ngx.log(ngx.ERR, v)
    end
end
Posted on April 15, 2019 12:57 PM by Subhash Chandran
nginx jwt lua openresty