Skip to content

Commit

Permalink
Verification of ftfrejaeid
Browse files Browse the repository at this point in the history
Verified API and updated settings for Funktionstjänster (CGI) Freja eID module (ftfrejaeid)
  • Loading branch information
DSorlov committed Sep 1, 2020
1 parent 419c399 commit 60c49fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
9 changes: 4 additions & 5 deletions modules/ftfrejaeid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -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};
Expand Down
7 changes: 3 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

<sup>* The API key we have been supplied with does not allow for freja authentication so largely untested but complies with api.<br/>
** GrandID do not officially support Freja eID for silent logins. Using some ugly workarounds tbh, so not for production I think imho.
<sup>* GrandID do not officially support Freja eID for silent logins. Using some ugly workarounds tbh. Evaluate before production!
</sup>

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.
Expand Down

0 comments on commit 60c49fb

Please sign in to comment.