Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datafund/consent-generator

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datafund/consent-generator

React plugin for generating a Consent Receipt (CR) JSON server-side.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

React plugin for generating a Consent Receipt (CR) JSON server-side.

Quick Use

Download package using npm:

$ npm install --save @datafund/consent-generator
                              


Import package to your React app:

import { ConsentGenerator } from 'consent-generator';


Prepare Consent Receipt data:

let formData = {
   "version": "Kantara_v1.1",
    "consentTimestamp": 1559734117,
    "collectionMethod": "Web form",
    "consentReceiptID": "d03bdfed-708a-4792-b6d2-eb336000359f",
    "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnzyis1ZjfNB0bBgKFMSv\nvkTtwlvBsaJq7S5wA+kzeVOVpVWwkWdVha4s38XM/pa/yr47av7+z3VTmvDRyAHc\naT92whREFpLv9cj5lTeJSibyr/Mrm/YtjCZVWgaOYIhwrXwKLqPr/11inWsAkfIy\ntvHWTxZYEcXLgAXFuUuaS3uF9gEiNQwzGTU1v0FqkqTBr4B8nW3HCN47XUu0t8Y0\ne+lf4s4OxQawWD79J9/5d3Ry0vbV3Am1FtGJiJvOwRsIfVChDpYStTcHTCMqtvWb\nV6L11BWkpzGXSW4Hv43qa+GSYOD2QU68Mb59oSk2OB+BtOLpJofmbGEGgvmwyCI9\nMwIDAQAB\n-----END PUBLIC KEY-----",
    "language": "English",
    "piiPrincipalId": "individual@example.com",
    "piiControllers": [
      {
        "address": {},
        "piiController": "Datafund",
        "contact": "Jani Podatek",
        "email": "info@datafund.io",
        "phone": "+386 0000000",
        "piiControllerUrl": "http://datafund.io"
      }
    ],
    "policyUrl": "https://datafund.io/legal/privacy_policy.html",
    "services": [
      {
        "service": "Service example 1",
        "purposes": [
          {
            "purpose": "Core Function",
            "consentType": "explicit",
            "purposeCategory": [
              "Billing"
            ],
            "piiCategory": [
              "Email",
              "Phone number"
            ],
            "primaryPurpose": true,
            "termination": "1 year",
            "thirdPartyDisclosure": false
          }
        ]
      },
      {
        "service": "Service example 2",
        "purposes": [
          {
            "purpose": "Marketing",
            "consentType": "explicit",
            "purposeCategory": [
              "Direct marketing",
              "Delivery"
            ],
            "piiCategory": [
              "Home address",
              "Email address",
              "Phone number"
            ],
            "termination": "1 year",
            "thirdPartyDisclosure": true,
            "thirdPartyName": "AnalyticsRus"
          }
        ]
      }
    ],
    "sensitive": true,
    "spiCat": [
      "Health status",
      "Genetic data"
    ],
    "jurisdiction": "SI"
}


Add API root URL parameter:

let APIroot = "http://localhost:5000/api/v1/"


Add properties for verifying token:

let verifyOptions = {
                issuer: "issuer",
                subject: "subject",
                audience: "audience",
                expiresIn: "12h",
                algorithm: "RS256"
}


Include component in render() method of your app:

<ConsentGenerator formData={{formData}} APIroot={{APIroot}} verifyOptions={{verifyOptions}} />

Props :hammer_and_wrench:

  • formData (json)
  • APIroot (string)
  • verifyOptions (json)

FAQs

Package last updated on 27 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc