@dpa-id-components/dpa-id-token-service-client-javascript

1.0.1 • Public • Published

dpa-id-token-service-client-javascript

Client module for supplying and revoking data with the token service

Installing the package from npm

Please run below command to add the package to your project.

npm install @dpa-id-components/dpa-id-token-service-client-javascript

Usage in code

Submit a token

The following is a basic example of submitting a token

 const initializedClient = client.initialize({
    ingestionQueueUrl: "ingestionQueueUrl",
    revocationQueueUrl: "revocationQueueUrl"
})
initializedClient.submitToken("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", parseInt(new Date().getTime()/1000), parseInt(new Date().getTime()/1000), "dpa-select", "tester@test.de")
    .then(res => {
        console.log("Response : ", res)
    }).catch(err => {
    console.log("ERROR : ", err)
})

Revoke a token

The following is a basic example of revoking a token

const initializedClient = client.initialize({
    ingestionQueueUrl: "ingestionQueueUrl",
    revocationQueueUrl: "revocationQueueUrl"
})
initializedClient.revokeToken("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
    .then(res => {
        console.log("Response : ", res)
    }).catch(err => {
    console.log("ERROR : ", err)
})

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @dpa-id-components/dpa-id-token-service-client-javascript

    Weekly Downloads

    0

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    7.83 kB

    Total Files

    4

    Last publish

    Collaborators

    • goersch.juliane
    • martinherweg
    • borchert.manja
    • roessel.nico
    • karlbanke
    • hajo.cirksena.dpa
    • schubert.florian
    • michelle3105
    • arifpehlivan
    • dpa-connect-deployment
    • antje.sommer
    • mlnmln
    • andrewbeng89
    • mridul_dpa