Skip to content

Commit

Permalink
Merge pull request #4 from DSorlov/dev
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
DSorlov authored Jun 8, 2020
2 parents 376c294 + 9d0c07a commit 6657232
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 23 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog][keep-a-changelog]
## [Unreleased]
- Nothing for now

## [0.1.1] (2020-06-08)
- Fixed broken paths in the module
- Fixed broken implementation in gbankid

## [0.1.0] (2020-06-08)
- Multi-variable input support takes string or object containing ssn in most modules
- module frejaeid now supports multi country, default is sweden ([SE,NO,FI,DK])
Expand Down
4 changes: 2 additions & 2 deletions eid-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const fs = require('fs')
module.exports = function(provider) {

// Check so module exists
if (fs.existsSync("./modules/"+provider+".js")) {
if (fs.existsSync(__dirname +"/modules/"+provider+".js")) {

// Prepare....
var module = {};
var library = require("./modules/"+provider+".js");
var library = require(__dirname +"/modules/"+provider+".js");

// Dunk those functions in there..
module.settings = library.settings;
Expand Down
6 changes: 3 additions & 3 deletions modules/bankid.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ const defaultSettings = {
production: {
endpoint: 'https://appapi2.bankid.com/rp/v5',
client_cert: '',
ca_cert: fs.readFileSync(`./certs/bankid_prod.ca`),
ca_cert: fs.readFileSync(__dirname +`/../certs/bankid_prod.ca`),
allowFingerprint: true,
password: ''
},
testing: {
endpoint: 'https://appapi2.test.bankid.com/rp/v5',
client_cert: fs.readFileSync('./certs/bankid_test.pfx'),
ca_cert: fs.readFileSync(`./certs/bankid_test.ca`),
client_cert: fs.readFileSync(__dirname +'/../certs/bankid_test.pfx'),
ca_cert: fs.readFileSync(__dirname +`/../certs/bankid_test.ca`),
allowFingerprint: true,
password: 'qwerty123'
}
Expand Down
10 changes: 5 additions & 5 deletions modules/frejaeid.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ const defaultSettings = {
production: {
endpoint: 'https://services.prod.frejaeid.com',
client_cert: '',
ca_cert: fs.readFileSync(`./certs/bankid_prod.ca`),
jwt_cert: fs.readFileSync(`./certs/frejaeid_prod.jwt`),
ca_cert: fs.readFileSync(__dirname +`/../certs/bankid_prod.ca`),
jwt_cert: fs.readFileSync(__dirname +`/../certs/frejaeid_prod.jwt`),
minimumLevel: 'EXTENDED',
password: '',
default_country: 'SE'
},
testing: {
endpoint: 'https://services.test.frejaeid.com',
client_cert: fs.readFileSync('./certs/frejaeid_test.pfx'),
ca_cert: fs.readFileSync(`./certs/frejaeid_test.ca`),
jwt_cert: fs.readFileSync(`./certs/frejaeid_test.jwt`),
client_cert: fs.readFileSync(__dirname +'/../certs/frejaeid_test.pfx'),
ca_cert: fs.readFileSync(__dirname +`/../certs/frejaeid_test.ca`),
jwt_cert: fs.readFileSync(__dirname +`/../certs/frejaeid_test.jwt`),
minimumLevel: 'EXTENDED',
password: 'test',
default_country: 'SE'
Expand Down
10 changes: 5 additions & 5 deletions modules/frejaorgid.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ const defaultSettings = {
production: {
endpoint: 'https://services.prod.frejaeid.com',
client_cert: '',
ca_cert: fs.readFileSync(`./certs/bankid_prod.ca`),
jwt_cert: fs.readFileSync(`./certs/frejaeid_prod.jwt`),
ca_cert: fs.readFileSync(__dirname +`/../certs/bankid_prod.ca`),
jwt_cert: fs.readFileSync(__dirname +`/../certs/frejaeid_prod.jwt`),
password: ''
},
testing: {
endpoint: 'https://services.test.frejaeid.com',
client_cert: fs.readFileSync('./certs/frejaeid_test.pfx'),
ca_cert: fs.readFileSync(`./certs/frejaeid_test.ca`),
jwt_cert: fs.readFileSync(`./certs/frejaeid_test.jwt`),
client_cert: fs.readFileSync(__dirname +'/../certs/frejaeid_test.pfx'),
ca_cert: fs.readFileSync(__dirname +`/../certs/frejaeid_test.ca`),
jwt_cert: fs.readFileSync(__dirname +`/../certs/frejaeid_test.jwt`),
password: 'test'
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/ftbankid.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const soap = require("soap");
const defaultSettings = {
production: {
endpoint: 'https://grp.funktionstjanster.se:18898/grp/v2?wsdl',
ca_cert: fs.readFileSync(`./certs/ftbankid_prod.ca`),
ca_cert: fs.readFileSync(__dirname +`/../certs/ftbankid_prod.ca`),
display_name: '',
policy: ''
},
testing: {
endpoint: 'https://grpt.funktionstjanster.se:18898/grp/v2?wsdl',
ca_cert: fs.readFileSync(`./certs/ftbankid_test.ca`),
ca_cert: fs.readFileSync(__dirname +`/../certs/ftbankid_test.ca`),
display_name: 'test',
policy: 'logtest020'
}
Expand Down
4 changes: 2 additions & 2 deletions modules/ftfrejaeid.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const soap = require("soap");
const defaultSettings = {
production: {
endpoint: 'https://grp.funktionstjanster.se:18898/grp/v2?wsdl',
ca_cert: fs.readFileSync(`./certs/ftfrejaeid_prod.ca`),
ca_cert: fs.readFileSync(__dirname +`/../certs/ftfrejaeid_prod.ca`),
display_name: '',
policy: ''
},
testing: {
endpoint: 'https://grpt.funktionstjanster.se:18898/grp/v2?wsdl',
ca_cert: fs.readFileSync(`./certs/ftfrejaeid_test.ca`),
ca_cert: fs.readFileSync(__dirname +`/../certs/ftfrejaeid_test.ca`),
display_name: 'test',
policy: 'logtest020'
}
Expand Down
4 changes: 2 additions & 2 deletions modules/gbankid.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async function followRequest(self,initresp, initcallback=undefined, statuscallba

async function initAuthRequest(ssn){
ssn = unPack(ssn);
return await initRequest(this,ssn, {
return await initRequest(this, {
callbackUrl: "https://localhost/",
personalNumber: ssn,
pushNotification: "TGVnaXRpbWVyaW5nCg==",
Expand All @@ -169,7 +169,7 @@ async function initAuthRequest(ssn){

async function initSignRequest(ssn,text){
ssn = unPack(ssn);
return await initRequest(this,ssn, {
return await initRequest(this, {
callbackUrl: "https://localhost/",
personalNumber: ssn,
pushNotification: "U2lnbmVyaW5n",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eid-provider",
"version": "0.1.0",
"version": "0.1.1",
"description": "Integration module for electronic identification providers",
"bundleDependencies": false,
"deprecated": false,
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![stability-stable](https://img.shields.io/badge/stability-stable-green.svg)](#)
[![version](https://img.shields.io/badge/version-0.1.0-green.svg)](#)
[![version](https://img.shields.io/badge/version-0.1.1-green.svg)](#)
[![maintained](https://img.shields.io/maintenance/yes/2020.svg)](#)
[![maintainer](https://img.shields.io/badge/maintainer-daniel%20sörlöv-blue.svg)](https://github.com/DSorlov)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://img.shields.io/github/license/DSorlov/eid-provider)
Expand Down

0 comments on commit 6657232

Please sign in to comment.