From c3ae947045e06b0969e20078ff487f09f5c73d0a Mon Sep 17 00:00:00 2001 From: yaswanth-pula-skyflow Date: Fri, 9 Jun 2023 16:29:34 +0530 Subject: [PATCH 1/2] SK-353 update readme and samples for redaction in detokenize. --- README.md | 16 +++++++++++++--- samples/vault-api/Detokenize.ts | 3 +++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cfd2b70..a7f460a 100644 --- a/README.md +++ b/README.md @@ -577,11 +577,20 @@ In order to retrieve data from your vault using tokens that you have previously ```javascript data = { records: [{ - // Token for the record to be fetched. - token: 'string' + token: 'string', // Required, token for the record to be fetched. + redaction: Skyflow.RedactionType // Optional, redaction type to be applied to retrieved data, ex: Skyflow.RedactionType.PLAIN_TEXT }] } ``` +`Skyflow.RedactionType` accept four values: +* `PLAIN_TEXT` +* `MASKED` +* `REDACTED` +* `DEFAULT` + +Note: +- `redaction` defaults to Skyflow.RedactionType.PLAIN_TEXT. + An [example](https://github.com/skyflowapi/skyflow-node/blob/master/samples/vault-api/Detokenize.ts) of a detokenize call: ```javascript @@ -589,6 +598,7 @@ const result = client.detokenize({ records: [ { token: '4017-f72b-4f5c-9b-8e719', + redaction: Skyflow.RedactionType.PLAIN_TEXT }, ], }); @@ -629,7 +639,7 @@ data = { }] }; ``` -`Skyflow.RedactionTypes` accept four values: +`Skyflow.RedactionType` accept four values: * `PLAIN_TEXT` * `MASKED` * `REDACTED` diff --git a/samples/vault-api/Detokenize.ts b/samples/vault-api/Detokenize.ts index bb42049..b9328b5 100644 --- a/samples/vault-api/Detokenize.ts +++ b/samples/vault-api/Detokenize.ts @@ -38,12 +38,15 @@ const result = skyflow.detokenize({ records: [ { token: '', + redaction: Skyflow.RedactionType.DEFAULT // optional }, { token: '', + redaction: Skyflow.RedactionType.MASKED // optional }, { token: '', + redaction: Skyflow.RedactionType.REDACTED // optional }, { token: '', From 936452b105b21e3da90b7d0c59aee910e12314e2 Mon Sep 17 00:00:00 2001 From: yaswanth-pula-skyflow Date: Fri, 9 Jun 2023 19:02:47 +0530 Subject: [PATCH 2/2] SK-353 update changelog for v1.10.0 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 283b43e..fd91006 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## [1.10.0] - 2023-06-08 +### Added +- `redaction` in detokenize interface. +### Changed +- Removed grace period logic for bearer token generation. ## [1.9.3] - 2023-03-17 ### Changed - Removed grace period logic for bearer token generation.