SkyLothar / lua-resty-jwt

JWT For The Great Openresty
Apache License 2.0
513 stars 179 forks source link

attempt to index local 'jwt' (a userdata value) #88

Open dagouwang opened 5 years ago

dagouwang commented 5 years ago

I used the sample you gived and there are some information

`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):28: attempt to index local 'jwt' (a userdata value)

dagouwang commented 5 years ago

I found that hmac.lua is needed to run this code.it's already done