you need to specify this library's path in ngx_lua'slua_package_pathdirective. For example,lua_package_path "/path/to/lua-resty-jwt/lib/?.lua;;";. you userequireto load the library into a local Lua variable: localjwt=require"resty.jwt" ...
`local jwt = require "resty.jwt" local jwt_token = jwt:sign( "lua-resty-jwt", { header={typ="JWT", alg="HS256"}, payload={foo="bar"} } ) ngx.say(jwt_token)` 2019/08/14 03:24:05 [error] 6#6: *4 lua entry thread aborted: runtime error: content_by_lua(nginx.conf:70...