Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dagouwang opened this issue Aug 14, 2019 · 1 comment
Open

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

dagouwang opened this issue Aug 14, 2019 · 1 comment

Comments

@dagouwang
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant