@privacybydesign/irmajs
`irmajs` is a Javascript client of the RESTful JSON API offered by the [`irma server`](https://github.com/privacybydesign/irmago/tree/master/irma). It allows you to use the `irma server` to:
Last updated an hour ago by sringers .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @privacybydesign/irmajs 
SYNC missed versions from official npm registry.

irmajs

irmajs is a Javascript client of the RESTful JSON API offered by the irma server. It allows you to use the irma server to:

  • Verify IRMA attributes. You specify which attributes, the library handles the user interaction and the communication with the irma server and the IRMA app).
  • Issue IRMA attributes.
  • Create IMRA attribute-based signatures: signature on a string to which IRMA attributes are verifiably attached.

irmajs supports all major browsers (Firefox, Chrome, Safari, Edge, Internet Explorer 11).

Documentation

Technical documentation of irmajs can be found at irma.app/docs.

Building

Compile the library:

npm run build

This writes irma.js to the dist folder, which you can include in your website in a <script> tag

Browser example

If you have included irma.js (e.g. <script src="irma.js" defer></script>) you can start an IRMA disclosure session as follows:

const request = {
    'type': 'disclosing',
    'content': [{
        'label': 'Over 18',
        'attributes': [ 'irma-demo.MijnOverheid.ageLower.over18' ]
    }]
};

irma.startSession(server, request)
    .then(({ sessionPtr, token }) => irma.handleSession(sessionPtr, {server, token}))
    .then(result => console.log('Done', result));

This assumes you have an irma server that is configured to accept unauthenticated session requests listening at the URL indicated by server.

For complete examples, see the examples folder.

Current Tags

  • 0.1.3                                ...           latest (an hour ago)

3 Versions

  • 0.1.3                                ...           an hour ago
  • 0.1.2                                ...           2 hours ago
  • 0.1.0                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 29
This Month 29
Last Day 29
Last Week 0
Last Month 18
Dependencies (7)
Dev Dependencies (18)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |