Skip to content

Commit da64b1a

Browse files
authored
Merge pull request #22 from DSorlov/dev
1.0.1
2 parents aeeabe2 + f1c9852 commit da64b1a

12 files changed

+182
-82
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2021 Daniel Sörlöv
3+
Copyright (c) 2020-2023 Daniel Sörlöv
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: changelog.md

+12
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ The format is based on [Keep a Changelog][keep-a-changelog]
55

66
## [Unreleased]
77

8+
## [1.0.1] (2023-03-22)
9+
10+
### Added
11+
- Updates to support new attributes in frejaeid
12+
- New certificates to support rollover in 2023
13+
- Bumped jsonwebtoken to 9.0.0
14+
15+
### Notable changes
16+
- Field names in frejaeid under extras have been normalized
17+
- Versions under 1.0.0 are no longer supported for security updates
18+
819
## [1.0.0] (2021-06-05)
920

1021
### Breaking changes
@@ -117,6 +128,7 @@ The format is based on [Keep a Changelog][keep-a-changelog]
117128

118129
[keep-a-changelog]: http://keepachangelog.com/en/1.0.0/
119130
[Unreleased]: https://github.com/DSorlov/eid-provider/compare/master...dev
131+
[1.0.1]: https://github.com/DSorlov/eid-provider/releases/tag/v1.0.0
120132
[1.0.0]: https://github.com/DSorlov/eid-provider/releases/tag/v1.0.0
121133
[0.2.1]: https://github.com/DSorlov/eid-provider/releases/tag/v0.2.1
122134
[0.2.0]: https://github.com/DSorlov/eid-provider/releases/tag/v0.2.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIEvDCCAySgAwIBAgIUO7H1JLQMSMERte/IgsBUOP6qBSYwDQYJKoZIhvcNAQEL
3+
BQAweTELMAkGA1UEBhMCU0UxFDASBgNV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AH/lokazs32mk5QlUYTZBkoP5IOxuYbm8pbr/pgDfz/E
20+
NEJ8OWycfDuS/fBBL59OwjOfWBlmFdDtUXoTYCjYjNVrIvfNOE62dAXN4RzqBq+c
21+
Uoov6MDvYfARi1B3wWuAwbZ2swNRuh/NyNLB3RsfHXya/XjA3w2MYfIeytKdBvcS
22+
LMOiwx4wxePtox8OuL0H6wAA8mmJdW0lCPyAyYiRRmP91DpLQwpXGCgN6MLJwpAA
23+
t611z17VoZhYT6PaSHvhyV05q3o/ayRFAp2xTh7ZoAALsBcEeaSg27RuuxxHFDeW
24+
6aqsZiUbkqEdBvaUcbN7s33O1gTLnPLhsTjMTtjwKfLCd+1jR32MQw1WdXXpgZRF
25+
pIgy5DW9jrOeFGUOfc+wErAeykm+XlrsBC/I3/mRra1fLYnvLToTkHPfWl1jQYfA
26+
E38EAlxcQpaV46znmReHq/xB+/yTWLboJO/UMgp8PyqCiumP4kXu7oLJ++48R+nu
27+
kptNjrjW1RSy4YOYySFxuA==
28+
-----END CERTIFICATE-----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIID+zCCAuOgAwIBAgIUXB3gwjUzjQcd77CDrCgXXbeQPowwDQYJKoZIhvcNAQEL
3+
BQAwgYMxCzAJBgNVBAYTAlNFMRIwEAYDVQQHEwlTdG9ja2hvbG0xFDASBgNVBGET
4+
CzU1OTExMC00ODA2MR0wGwYDVQQKExRWZXJpc2VjIEZyZWphIGVJRCBBQjENMAsG
5+
A1UECxMEVGVzdDEcMBoGA1UEAxMTUlNBIFRFU1QgSXNzdWluZyBDQTAeFw0yMzAy
6+
MjMxMTQ4MThaFw0yNjAyMjMxMTQ4MThaMHUxIzAhBgNVBAMTGkZyZWphIGVJRCBU
7+
RVNUIEpXUyBTaWduaW5nMRQwEgYDVQRhEws1NTkxMTAtNDgwNjENMAsGA1UECxME
8+
VGVzdDEcMBoGA1UEChMTRnJlamEgZUlEIFN3ZWRlbiBBQjELMAkGA1UEBhMCU0Uw
9+
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDiMthhWkZT9Ovye8qzJpL/
10+
jHQODkVUUvQTvrE7uhG8rLKfya125XzIqfCAltazpfHS8e4o1cfET9PJ1YgsMlcE
11+
UszMpgvDbBeBm28LipFUk1njXTtGV39+lQ88KLpTHKhRPRxEdmRpcMuX1tHD13a3
12+
N0jwhcAWrFuZLsiheP1i7xNKda2Rontsg3prFPtzY4sW9kO1UQfOecay/MqIpGbs
13+
uH7kQbIDrY18Z1TNX8YRc5E+K69gZTBl+pLjjpZy49P02HriKA3a8upU0QKSqio8
14+
X1pkllBpXiIjib+Hxoze6xqnHfi3iHXidNjtxsam8b+gwwafKpSCFfl/rswTpPNR
15+
AgMBAAGjdDByMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8EAjAAMB8GA1UdIwQY
16+
MBaAFGp8ig+dcA4c2l8toDwmX4joFb+cMBIGA1UdIAQLMAkwBwYFKgMEBQowHQYD
17+
VR0OBBYEFL10m8p9GIWlWojIKxoXROpmkDdfMA0GCSqGSIb3DQEBCwUAA4IBAQAU
18+
YsxIpDi7iju0yvupfhrGDyJk8AX7aDmhpyYWx+EitDHqI9aqULH+9GxEFRCor+Y2
19+
a0d7hzkRzSITma0bvS+evpd4QwIhRRf00RASqnY4g4J+8knFoT7AJ7r2oJpogrzR
20+
8L7e5BJUnnDA9btBh01Jq5Rh4aY3azRHFeS9E26/NaRbZhOaE23r8EDGGt1oYGOA
21+
DkC2ouiJgnELga7DnYjroCDXRfzTeb2lmQzjyAp+tjW1MO1fQuN5cElyJkxDRtAS
22+
0TTGXdXux9UDCFjJL+ZaMJxOFdX9i2gQTlMitY8FzQ10pFiGt77h93TQjTS/Sfz1
23+
K2wpZ6CXk/WQQs1aXOl7
24+
-----END CERTIFICATE-----

Diff for: clients/frejaeid/client.js

+27-9
Original file line numberDiff line numberDiff line change
@@ -138,22 +138,40 @@ class FrejaEID extends BaseClient {
138138
var fullname = '';
139139
var id = userId;
140140
var extras = {
141-
jwt_token: result.json.details
141+
jwtToken: result.json.details
142142
};
143143

144-
if (decoded.requestedAttributes.dateOfBirth) extras.date_of_birth = decoded.requestedAttributes.dateOfBirth;
145-
if (decoded.requestedAttributes.emailAddress) extras.primary_email = decoded.requestedAttributes.emailAddress;
146-
if (decoded.requestedAttributes.allEmailAddresses) extras.email_addresses = decoded.requestedAttributes.allEmailAddresses;
147-
if (decoded.requestedAttributes.allPhoneNumbers) extras.phone_numbers = decoded.requestedAttributes.allPhoneNumbers;
144+
if (decoded.requestedAttributes.age) extras.age = decoded.requestedAttributes.age;
145+
if (decoded.requestedAttributes.photo) extras.age = decoded.requestedAttributes.photo;
146+
if (decoded.requestedAttributes.dateOfBirth) extras.dateOfBirth = decoded.requestedAttributes.dateOfBirth;
147+
if (decoded.requestedAttributes.emailAddress) extras.primaryEmail = decoded.requestedAttributes.emailAddress;
148+
if (decoded.requestedAttributes.allEmailAddresses) extras.emailAddresses = decoded.requestedAttributes.allEmailAddresses;
149+
if (decoded.requestedAttributes.allPhoneNumbers) extras.phoneNumbers = decoded.requestedAttributes.allPhoneNumbers;
148150
if (decoded.requestedAttributes.addresses) extras.addresses = decoded.requestedAttributes.addresses;
149-
if (decoded.requestedAttributes.customIdentifier) extras.custom_identifier = decoded.requestedAttributes.customIdentifier;
150-
if (decoded.requestedAttributes.registrationLevel) extras.registration_level = decoded.requestedAttributes.registrationLevel;
151+
if (decoded.requestedAttributes.customIdentifier) extras.customIdentifier = decoded.requestedAttributes.customIdentifier;
152+
if (decoded.requestedAttributes.registrationLevel) extras.registrationLevel = decoded.requestedAttributes.registrationLevel;
151153

152154
if (decoded.requestedAttributes.ssn) {
153-
extras.ssn_number = decoded.requestedAttributes.ssn.ssn;
154-
extras.ssn_country = decoded.requestedAttributes.ssn.country;
155+
extras.ssnNumber = decoded.requestedAttributes.ssn.ssn;
156+
extras.ssnCountry = decoded.requestedAttributes.ssn.country;
155157
}
156158

159+
if (decoded.requestedAttributes.document) {
160+
extras.documentType = decoded.requestedAttributes.document.type;
161+
extras.documentCountry = decoded.requestedAttributes.document.country;
162+
extras.documentNumber = decoded.requestedAttributes.document.serialNumber;
163+
extras.documentExpiration = decoded.requestedAttributes.document.expirationDate;
164+
}
165+
166+
if (decoded.requestedAttributes.covidCertificates) {
167+
if (decoded.requestedAttributes.covidCertificates.allowed == "true") {
168+
extras.covidVaccines = decoded.requestedAttributes.covidCertificates.vaccines.certificate;
169+
extras.covidTests = decoded.requestedAttributes.covidCertificates.tests.certificate;
170+
extras.covidRecovery = decoded.requestedAttributes.covidCertificates.recovery.certificate;
171+
}
172+
}
173+
174+
157175
if (decoded.requestedAttributes.basicUserInfo) {
158176
firstname = decoded.requestedAttributes.basicUserInfo ? decoded.requestedAttributes.basicUserInfo.name : '',
159177
lastname = decoded.requestedAttributes.basicUserInfo ? decoded.requestedAttributes.basicUserInfo.surname : '',

Diff for: clients/frejaeid/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Client for direct API communication with Freja eID REST API (Freja eID AB).
66

77
| Information | |
88
| --- | --- |
9-
| Version | 20210406 |
9+
| Version | 20230322 |
1010
| Status | Built-in |
1111
| Author | Daniel Sörlöv <[email protected]> |
1212
| Client URL | https://github.com/DSorlov/eid-provider |

Diff for: clients/frejaeid/settings.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ module.exports = function(options) {
1111
password: '',
1212
ca_cert: fs.readFileSync(path.join(__dirname,'/cert','prod.ca')),
1313
jwt_cert: {
14-
'aRw9OLn2BhM7hxoc458cIXHfezw': fs.readFileSync(path.join(__dirname,'/cert','prod_aRw9OLn2BhM7hxoc458cIXHfezw.jwt'))
14+
'aRw9OLn2BhM7hxoc458cIXHfezw': fs.readFileSync(path.join(__dirname,'/cert','prod_aRw9OLn2BhM7hxoc458cIXHfezw.jwt')),
15+
'wSYLdhe93ToPR2X1UrNXxOg1juI': fs.readFileSync(path.join(__dirname,'/cert','prod_wSYLdhe93ToPR2X1UrNXxOg1juI.jwt'))
1516
},
1617
minimumLevel: 'EXTENDED',
1718
default_country: 'SE',
@@ -26,7 +27,8 @@ module.exports = function(options) {
2627
client_cert: fs.readFileSync(path.join(__dirname,'/cert','test.pfx')),
2728
ca_cert: fs.readFileSync(path.join(__dirname,'/cert','test.ca')),
2829
jwt_cert: {
29-
'2LQIrINOzwWAVDhoYybqUcXXmVs': fs.readFileSync(path.join(__dirname,'/cert','test_2LQIrINOzwWAVDhoYybqUcXXmVs.jwt'))
30+
'2LQIrINOzwWAVDhoYybqUcXXmVs': fs.readFileSync(path.join(__dirname,'/cert','test_2LQIrINOzwWAVDhoYybqUcXXmVs.jwt')),
31+
'DiZbzBfysUm6-IwI-GtienEsbjc': fs.readFileSync(path.join(__dirname,'/cert','test_DiZbzBfysUm6-IwI-GtienEsbjc.jwt'))
3032
},
3133
minimumLevel: 'EXTENDED',
3234
password: 'test',

Diff for: package-lock.json

+79-64
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "eid",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Module for simple integration to electronic identities",
55
"bundleDependencies": false,
66
"deprecated": false,
77
"main": "index.js",
88
"author": "Daniel Sörlöv",
99
"license": "MIT",
1010
"dependencies": {
11-
"jsonwebtoken": "^8.5.1"
11+
"jsonwebtoken": "^9.0.0"
1212
},
1313
"repository": {
1414
"type": "git",

Diff for: readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![NPM version](https://img.shields.io/npm/v/eid.svg?style=flat)
22
![stability-stable](https://img.shields.io/badge/stability-stable-green.svg)
3-
![version](https://img.shields.io/badge/version-1.0.0-green.svg)
4-
![maintained](https://img.shields.io/maintenance/yes/2022.svg)
3+
![version](https://img.shields.io/badge/version-1.0.1-green.svg)
4+
![maintained](https://img.shields.io/maintenance/yes/2023.svg)
55
[![maintainer](https://img.shields.io/badge/maintainer-dsorlov-blue.svg)](https://github.com/DSorlov)
66
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://img.shields.io/github/license/DSorlov/eid)
77

Diff for: security.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The following versions are supported for security updates.
77
| Version | Supported |
88
| ------- | ------------------ |
99
| 1.0.0+ | :white_check_mark: |
10-
| 0.2.1 | :white_check_mark: |
10+
| 0.2.1 | :x: |
1111
| <0.2.0 | :x: |
1212

1313
## Reporting a Vulnerability

0 commit comments

Comments
 (0)