Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oddhill/node-bankid
A small library to help you more easily connect to the BankID HTTP/JSON API.
https://github.com/oddhill/node-bankid
bankid nodejs
Last synced: 23 days ago
JSON representation
A small library to help you more easily connect to the BankID HTTP/JSON API.
- Host: GitHub
- URL: https://github.com/oddhill/node-bankid
- Owner: oddhill
- License: mit
- Created: 2016-09-19T09:37:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T18:58:38.000Z (almost 2 years ago)
- Last Synced: 2024-11-30T17:41:25.700Z (25 days ago)
- Topics: bankid, nodejs
- Language: JavaScript
- Homepage:
- Size: 307 KB
- Stars: 6
- Watchers: 3
- Forks: 3
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# BankID API Client
[![Build Status](https://travis-ci.org/oddhill/node-bankid.svg?branch=master)](https://travis-ci.org/oddhill/node-bankid)
[![Coverage Status](https://coveralls.io/repos/github/oddhill/node-bankid/badge.svg?branch=master)](https://coveralls.io/github/oddhill/node-bankid?branch=master) [![Greenkeeper badge](https://badges.greenkeeper.io/oddhill/node-bankid.svg)](https://greenkeeper.io/)This package will help you make requests to the BankID HTTP/JSON API.
## Requirements
- A pfx certificate issued by a certified Bank.
- The [request](https://www.npmjs.com/package/request) module needs to be installed as a dependency.## Getting started
Run the following command in your terminal to install the module to your project.
### NPM
```
npm install @oddhill/bankid request
```### Yarn
```
yarn add @oddhill/bankid request
```## Example
Below is an example showing how to use the library when making a request to the Authenticate method on the BankID HTTP/JSON API.
```
const bankid = require('bankid);const options = {
pfx: './path-to-your-pfx-certificate.pfx',
passphrase: 'certpassphrasse',
};bankid(options, (err, service) => {
if (err) console.log(err);const args = {
personalNumber: '199801011234',
endUserIp: '192.168.0.1',
};service.authenticate(args, (err, response) => {
console.log(response);
});
});
```