-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [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
Showing
5 changed files
with
56 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'] | ||
|
@@ -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; | ||
|
@@ -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) { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters