Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
## [1.1.2] (2024-10-23)

### Added
- Added extras.phoneNumber to denote primary phone (Freja)
- Added photoHash (Freja)

### Fixed
- Fixed broken photo attribute (Freja)
  • Loading branch information
DSorlov committed Oct 23, 2024
1 parent 055c3a0 commit 992a41e
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 39 deletions.
16 changes: 15 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
The format is based on [Keep a Changelog][keep-a-changelog]
<!-- and this project adheres to [Semantic Versioning][semantic-versioning]. -->

## [1.1.2] (2024-10-23)

### Added
- Added extras.phoneNumber to denote primary phone (Freja)
- Added photoHash (Freja)

### Fixed
- Fixed broken photo attribute (Freja)

## [1.1.1] (2024-07-16)

### Added
Expand Down Expand Up @@ -161,7 +170,12 @@ The format is based on [Keep a Changelog][keep-a-changelog]

[keep-a-changelog]: http://keepachangelog.com/en/1.0.0/
[Unreleased]: https://github.com/DSorlov/eid-provider/compare/master...dev
[1.0.1]: https://github.com/DSorlov/eid-provider/releases/tag/v1.0.0
[1.1.2]: https://github.com/DSorlov/eid-provider/releases/tag/v1.1.2
[1.1.1]: https://github.com/DSorlov/eid-provider/releases/tag/v1.1.1
[1.1.0]: https://github.com/DSorlov/eid-provider/releases/tag/v1.1.0
[1.0.3]: https://github.com/DSorlov/eid-provider/releases/tag/v1.0.3
[1.0.2]: https://github.com/DSorlov/eid-provider/releases/tag/v1.0.2
[1.0.1]: https://github.com/DSorlov/eid-provider/releases/tag/v1.0.1
[1.0.0]: https://github.com/DSorlov/eid-provider/releases/tag/v1.0.0
[0.2.1]: https://github.com/DSorlov/eid-provider/releases/tag/v0.2.1
[0.2.0]: https://github.com/DSorlov/eid-provider/releases/tag/v0.2.0
Expand Down
11 changes: 9 additions & 2 deletions clients/frejaeid/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class FrejaEID extends BaseClient {

this.clientInfo = {
name: "FrejaEID",
version: "20240716",
version: "20241023",
author: "Daniel Sörlöv <[email protected]>",
url: "https://github.com/DSorlov/eid-provider",
methods: ['auth','sign']
Expand Down Expand Up @@ -148,9 +148,13 @@ class FrejaEID extends BaseClient {
jwtToken: result.json.details
};

if (result.json.requestedAttributes.photo) {
extras.photo = result.json.requestedAttributes.photo
}

if (decoded.requestedAttributes) {
if (decoded.requestedAttributes.age) extras.age = decoded.requestedAttributes.age;
if (decoded.requestedAttributes.photoFileInfo) extras.photo = decoded.requestedAttributes.photoFileInfo.fileHash;
if (decoded.requestedAttributes.photoFileInfo) extras.photoHash = decoded.requestedAttributes.photoFileInfo.fileHash;
if (decoded.requestedAttributes.dateOfBirth) extras.dateOfBirth = decoded.requestedAttributes.dateOfBirth;
if (decoded.requestedAttributes.emailAddress) extras.primaryEmail = decoded.requestedAttributes.emailAddress;
if (decoded.requestedAttributes.addresses) extras.addresses = decoded.requestedAttributes.addresses;
Expand All @@ -169,6 +173,9 @@ class FrejaEID extends BaseClient {
decoded.requestedAttributes.allPhoneNumbers.forEach((phoneObject)=>{
extras.phoneNumbers.push(phoneObject.phoneNumber);
})
if (extras.phoneNumbers.lenght>0) {
extras.phoneNumber = extras.phoneNumber[0]
}
}

if (decoded.requestedAttributes.ssn) {
Expand Down
64 changes: 30 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eid",
"version": "1.1.1",
"version": "1.1.2",
"description": "Module for simple integration to electronic identities",
"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,6 +1,6 @@
![NPM version](https://img.shields.io/npm/v/eid.svg?style=flat)
![stability-stable](https://img.shields.io/badge/stability-stable-green.svg)
![version](https://img.shields.io/badge/version-1.1.1-green.svg)
![version](https://img.shields.io/badge/version-1.1.2-green.svg)
![maintained](https://img.shields.io/maintenance/yes/2024.svg)
[![maintainer](https://img.shields.io/badge/maintainer-dsorlov-blue.svg)](https://github.com/DSorlov)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://img.shields.io/github/license/DSorlov/eid)
Expand Down

0 comments on commit 992a41e

Please sign in to comment.