From 9958887d71faab9640521f96240a2c13351cf6c8 Mon Sep 17 00:00:00 2001 From: matteo-cristino Date: Thu, 24 Oct 2024 10:38:58 +0200 Subject: [PATCH] refactor: rename "disclosed informations" to "disclosed kv" --- src/lua/zencode_sd_jwt.lua | 10 +++++----- test/zencode/sd_jwt.bats | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lua/zencode_sd_jwt.lua b/src/lua/zencode_sd_jwt.lua index 9ec1fd1c9..4210473a3 100644 --- a/src/lua/zencode_sd_jwt.lua +++ b/src/lua/zencode_sd_jwt.lua @@ -479,16 +479,16 @@ IfWhen("verify signed selective disclosure '' issued by '' is valid", function(o end) -When("create disclosed informations from signed selective disclosure ''", function(ssd_name) +When("create disclosed kv from signed selective disclosure ''", function(ssd_name) local ssd, ssd_c = have(ssd_name) zencode_assert(ssd_c.schema and ssd_c.schema == "signed_selective_disclosure", "Object is not a signed selective disclosure: " .. ssd_name) - local disclosed_informations = {} + local disclosed_kv = {} for _, v in pairs(ssd.disclosures) do - disclosed_informations[v[2]:str()] = v[3] + disclosed_kv[v[2]:str()] = v[3] end - ACK.disclosed_informations = disclosed_informations - new_codec('disclosed_informations', { + ACK.disclosed_kv = disclosed_kv + new_codec('disclosed kv', { encoding = 'string', luatype = 'table', zentype = 'd' diff --git a/test/zencode/sd_jwt.bats b/test/zencode/sd_jwt.bats index d4c7df55b..8c596f07d 100644 --- a/test/zencode/sd_jwt.bats +++ b/test/zencode/sd_jwt.bats @@ -529,17 +529,17 @@ EOF #issuer key from https://github.com/oauth-wg/oauth-selective-disclosure-jwt/blob/master/examples/settings.yml } -@test "create table of disclosed informations" { - cat <