Giter Site home page Giter Site logo

stefanwallin / eid-provider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dsorlov/eid-provider

0.0 1.0 0.0 461 KB

Integration module for electronic identification providers

Home Page: https://www.npmjs.com/package/eid

License: MIT License

JavaScript 100.00%

eid-provider's Introduction

NPM version stability-stable version maintained maintainer License

eid (previously eid-provider)

This module is developed to enable rapid deployment of identity based authentication for Node.js by creating a common interface to most of the suppliers for official electronic identification and it allows you to mix and match your suppliers. This is a reusability code port of code that I have contributed to teams-app-eid with some smart addons and international support.

Simple to use

Regardless of which backend service you use the basic usage is the same. Some backends require more configuration than others. However the classes expose same interface and responses so code is easy to use. You can read details of the interface or see some more practical examples

const eid = require('eid');

var config = eid.configFactory({clientType: 'frejaeid', enviroment: 'testing'});
var client = eid.clientFactory(config);

client.doRequest({id: '200101011212'}).then(function(endResult){
    console.log(endResult)
});

or the more backwards compatible

const eid = require('eid');

var config = eid.configFactory({clientType: 'frejaeid', enviroment: 'testing'});
var client = eid.clientFactory(config);

client.authRequest('200101011212').then(function(endResult) {
    console.log(endResult)
});

Built-in clients

Clients are the classes that manage communication with the backend services. The library supports a bunch of clients out of the box, but additional clients can easily be added to make sure that the one interface strategy works.

Client ID Types Vendor Authentication Signing Markets
FrejaEID Freja eID Freja eID AB ✔️ ✔️ 🇸🇪 🇩🇰 🇳🇴 🇫🇮
BankID BankID Finansiell ID-Teknik AB ✔️ ✔️ 🇸🇪
GRP2 Freja eID, BankID Funktionstjänster/CGI ✔️ ✔️ 🇸🇪
GrandID Freja eID, BankID, Mobile SiTHS Svensk E-Identitet AB ✔️ ✔️ 🇸🇪
Signicat BankID Signicat ✔️ 🇸🇪
IDKollen BankID IDkollen i Sverige AB ✔️ ✔️ 🇸🇪

The configuration options should be quite obvious as what they do. If you are unsure your supplier will most probably be able to determine what information you need. Most modules have sane values, certificates etc for most testing services and production services however there is no production credentials and you need to strike an agreement with the services yourself to obtain these.

eid-provider's People

Contributors

dependabot[bot] avatar dsorlov avatar

Watchers

 avatar

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.