project Websites / videos.bentasker.co.uk avatar

Websites / videos.bentasker.co.uk: dfdba23f




Add a debug field so can see the input information

Add a debug field so can see the input information

Commit dfdba23f.

Authored 2019-04-16T17:15:24.000+01:00 by B Tasker in project Websites / videos.bentasker.co.uk

+4 lines -4 lines

Changes

diff --git a/resources/tokenisation/minter/token_gen.lua b/resources/tokenisation/minter/token_gen.lua
--- a/resources/tokenisation/minter/token_gen.lua
+++ b/resources/tokenisation/minter/token_gen.lua
# @@ -33,10 +33,10 @@ local blacklisted_ips = {}
#
# -- Functions
#
# -local function sendSuccessful(tok,expires)
# +local function sendSuccessful(tok,expires,debug)
# -- response format should be
# -- {"status": true, "token": "OqBvCvqg49QJgGKDHFbdNccB", "exp": 0}
# - local r = {status = true, token = tok, exp = expires}
# + local r = {status = true, token = tok, exp = expires, d = debug}
# return json.encode(r)
# end
#
# @@ -101,5 +101,5 @@ local tok = mint_token(vidpath,expires,ip,secret)
# -- print(tok)
#
#
# --- ngx.print(sendSuccessful(tok,expires))
# -print(sendSuccessful(tok,expires)) -- offline testing only
# +-- ngx.print(sendSuccessful(tok,expires,{vidpath,ip,expires}))
# +print(sendSuccessful(tok,expires,{vidpath,ip,expires})) -- offline testing only
#