From 60c49fb9c8197afefb00f9ba8394e2b3ddabc541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20S=C3=B6rl=C3=B6v?= Date: Tue, 1 Sep 2020 12:51:45 +0200 Subject: [PATCH] Verification of ftfrejaeid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verified API and updated settings for Funktionstjänster (CGI) Freja eID module (ftfrejaeid) --- changelog.md | 1 + modules/ftfrejaeid.js | 9 ++++----- readme.md | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/changelog.md b/changelog.md index 33615ee..ad9b128 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog][keep-a-changelog] ### Fixed - Added error handling on internal errors when following requests, should create more stable library (all modules). +- Verified API and updated settings for Funktionstjänster (CGI) Freja eID module (ftfrejaeid) ## [0.1.5] (2020-09-01) diff --git a/modules/ftfrejaeid.js b/modules/ftfrejaeid.js index 8dec403..5b9f04c 100644 --- a/modules/ftfrejaeid.js +++ b/modules/ftfrejaeid.js @@ -87,11 +87,11 @@ function createClient(self,uri,method,options) { async function pollStatus(id,self=this) { - if (id.length!=73) { + if (id.length!=102) { return {status: 'error', code: 'request_id_invalid', description: 'The supplied request cannot be found'}; } - var orderRef = id.substring(37,73); + var orderRef = id.substring(37,102); var transactionId = id.substring(0,36); var [error,result] = await to(createClient(self,'GrpServicePortType/CollectRequest', 'Collect', { @@ -138,11 +138,10 @@ async function pollStatus(id,self=this) { ssn: result.userInfo.subjectIdentifier, firstname: result.userInfo.givenName, surname: result.userInfo.sn, - fullname: result.userInfo.displayName + fullname: result.userInfo.givenName + ' ' + result.userInfo.sn }, extra: { - signature: result.validationInfo.signature, - ocspResponse: result.validationInfo.ocspResponse} + signature: result.validationInfo.signature} }; default: return {status: 'error', code: 'api_error', description: 'A communications error occured', details: result.data}; diff --git a/readme.md b/readme.md index 49450de..8f4b8cd 100644 --- a/readme.md +++ b/readme.md @@ -31,14 +31,13 @@ There are basically right now two main types of integrations: one is working dir | Freja eID | [frejaeid](docs/frejaeid.md) | Verisec (Freja eID) | :heavy_check_mark: | :heavy_check_mark: | :sweden: :denmark: :norway: :finland: | Production | | Freja eID | [frejaorgid](docs/frejaorgid.md) | Verisec (Freja eID) | :heavy_check_mark: | :heavy_check_mark: | :sweden: :denmark: :norway: :finland: | Production | | Mobilt BankID | [ftbankid](docs/ftbankid.md) | Funktionstjänster (CGI) | :heavy_check_mark: | :heavy_check_mark: | :sweden: | Production | -| Freja eID | [ftfrejaeid](docs/ftfrejaeid.md) | Funktionstjänster (CGI) | :heavy_check_mark: | :heavy_check_mark: | :sweden: :denmark: :norway: :finland: | Not tested* | +| Freja eID | [ftfrejaeid](docs/ftfrejaeid.md) | Funktionstjänster (CGI) | :heavy_check_mark: | :heavy_check_mark: | :sweden: :denmark: :norway: :finland: | Production | | Mobilt BankID | [gbankid](docs/gbankid.md) | Svensk e-Identitet | :heavy_check_mark: | :heavy_check_mark: | :sweden: | Production | -| Freja eID | [gfrejaeid](docs/gfrejaeid.md) | Svensk e-Identitet | :heavy_check_mark:| :heavy_check_mark: | :sweden: | Production** | +| Freja eID | [gfrejaeid](docs/gfrejaeid.md) | Svensk e-Identitet | :heavy_check_mark:| :heavy_check_mark: | :sweden: | Stable* | | SITHS Mobile | [ghsaid](docs/ghsaid.md) | Svensk e-Identitet | :heavy_check_mark:| :heavy_check_mark: | :sweden: | Production | | Mobilt BankID | [gbankid](docs/idkbankid.md) | IDKollen | :heavy_check_mark: | :heavy_check_mark: | :sweden: | Production | -* The API key we have been supplied with does not allow for freja authentication so largely untested but complies with api.
-** GrandID do not officially support Freja eID for silent logins. Using some ugly workarounds tbh, so not for production I think imho. +* GrandID do not officially support Freja eID for silent logins. Using some ugly workarounds tbh. Evaluate before production! 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.