Filter claims with verification errors

This commit is contained in:
Yarmo Mackenbach 2020-12-20 23:32:59 +01:00
parent 0e1c20230e
commit bd5891a6d9

View file

@ -380,6 +380,7 @@ async function displayProfile(opts) {
return;
}
userId = userId.filter((a) => (a && a.errors.length == 0 && a.serviceproviderData))
userId = userId.sort((a,b) => (a.serviceproviderData.serviceprovider.name > b.serviceproviderData.serviceprovider.name) ? 1 : ((b.serviceproviderData.serviceprovider.name > a.serviceproviderData.serviceprovider.name) ? -1 : 0));
primaryClaims = userId
@ -425,6 +426,7 @@ async function displayProfile(opts) {
return;
}
userId = userId.filter((a) => (a && a.errors.length == 0 && a.serviceproviderData))
userId = userId.sort((a,b) => (a.serviceproviderData.serviceprovider.name > b.serviceproviderData.serviceprovider.name) ? 1 : ((b.serviceproviderData.serviceprovider.name > a.serviceproviderData.serviceprovider.name) ? -1 : 0));
if (primaryClaims && primaryClaims.toString() == userId.toString()) {