Giter VIP home page Giter VIP logo

inbound-detokenization-example's Introduction

Inbound Detokenization Example

This repository shows how to accept incoming https requests from any client, forwarding them to a server; and detokenize the token references (id) from the response, passing raw token data to the requester (client).

In this setup, the client wants to query the server for a user's SSN. The server has that data tokenized, so we will transform the server response to detokenize the ssn. To represent the server URL, we will use https://echo.basistheory.com/anything, to echo back whatever was passed in the request.

Diagram

Provision Resource with Terraform

Create a new Management Application with full application and proxy permissions.

Paste the API key to a new terraform.tfvars file at this repository root:

management_api_key = "key_W8wA8CmcbwXxJsomxeWHVy"

Initialize Terraform:

terraform init

And run Terraform to provision all the required resources:

terraform apply

Invoke the Proxy

Use the inbound_proxy_key generated as a Terraform state output to make the following request.

curl --location --request POST 'https://api.basistheory.com/proxy?bt-proxy-key={{inbound_proxy_key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"ssn": "ea0625f8-7354-4aba-9c34-0aa596353355"
}'

The ssn value in the request should be replaced by a token previously created.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.