0.4.3 • Published 3 years ago

@privacybydesign/irma-frontend v0.4.3

Weekly downloads
25
License
MIT
Repository
github
Last release
3 years ago

IRMA frontend

This is a thin wrapper around irma-core, irma-web, irma-popup, irma-client and irma-css. The intended use of this package is to provide an all-in-one Javascript file that developers can include to get started:

<script src="assets/irma.js" type="text/javascript"></script>

or as JavaScript import:

const irma = require('@privacybydesign/irma-frontend');

Documentation

More documentation on how to use this module can be found in the IRMA documentation.

Usage

When you want to use an embedded web element, then you can instantiate irma-frontend like so:

const example = irma.newWeb({
  debugging: false,            // Enable to get helpful output in the browser console
  element:   '#irma-web-form', // Which DOM element to render to

  // Back-end options
  session: {
    // Configure your flow here, see code examples in root README file
  },

  ...
});

When you want to use a popup overlay that renders on top of the content of your website, then you can instantiate irma-frontend like so:

const example = irma.newPopup({
  debugging: false, // Enable to get helpful output in the browser console

  // Back-end options
  session: {
    // Configure your flow here, see code examples in root README file
  },

  ...
});

Finally, you can start your IRMA flow:

example.start()
.then(result => console.log("Successful disclosure! 🎉", result))
.catch(error => console.error("Couldn't do what you asked 😢", error));

Be aware that you can start an instance of irma-core only once. When you want to call start() again, you have to create a new instance.

Download

A bundled JavaScript file can be found here. Please download this file and host it yourself. Versions can change and we do not want to break your website.

Development

You can link local versions of modules easily using npm link. There is an explanation about how to use npm link in the README of the irma-frontend-packages root directory.

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.1-rc.16

4 years ago

0.1.1-rc.15

4 years ago

0.1.1-rc.14

4 years ago

0.1.1-rc.13

4 years ago

0.1.1-rc.12

4 years ago

0.1.1-rc.10

4 years ago

0.1.1-rc.11

4 years ago

0.1.1-rc.9

4 years ago

0.1.1-rc.8

4 years ago

0.1.1-rc.7

4 years ago

0.1.1-rc.6

4 years ago

0.1.1-rc.5

4 years ago

0.1.1-rc.3

4 years ago

0.1.1-rc.4

4 years ago

0.1.1-rc.2

4 years ago

0.1.1-rc.1

4 years ago

0.1.1-rc.0

4 years ago