refactor lib
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
local cjson = require "cjson"
|
||||
--local cjson = require "cjson"
|
||||
--# https://github.com/SkyLothar/lua-resty-jwt
|
||||
--$ opm get SkyLothar/lua-resty-jwt
|
||||
local jwt = require "resty.jwt"
|
||||
--local jwt = require "resty.jwt"
|
||||
|
||||
local function cleanupString(str, remove)
|
||||
local lcSubStrTab = {}
|
||||
@@ -63,7 +63,7 @@ local function verifyJwtToken(httpc, token)
|
||||
|
||||
end
|
||||
|
||||
local function decodeJwtClaim(jwtClaim)
|
||||
local function decodeJwtClaim(jwtClaim, cjson, jwt)
|
||||
local jwtKey = "0xCAFEBABE0xCAFEBABE0xCAFEBABE0xCAFEBABE0xCAFEBABE0xCAFEBABE"
|
||||
local jwtObj = jwt:verify(jwtKey, jwtClaim)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user