cdbattags / lua-resty-jwt

JWT For The Great Openresty
Apache License 2.0
146 stars 44 forks source link

data return nil #55

Closed dattp closed 2 years ago

dattp commented 2 years ago

Hello I am implementing lua-resty-jwt in my plugin by lua, but when i use jwt.load_jwt function i received nil result. This's my code

local jwt = require "resty.jwt"

local accessToken = kong.request.get_header('authorization')
print('======>accessToken: ', accessToken)

local jwtLoaded = jwt.load_jwt(accessToken)
print('======>jwtObject: ', tostring(jwtLoaded[1])) -- log nil
dattp commented 2 years ago

sr, This is my mistake. Should use cjson to print