diff --git a/credential-status-list b/credential-status-list index 74cbdcc..d5cfde8 160000 --- a/credential-status-list +++ b/credential-status-list @@ -1 +1 @@ -Subproject commit 74cbdcc24506507e622cfb44843dfbb13cf3b3a2 +Subproject commit d5cfde8bd50be5ddb8c4bab13a8d4b8a59c76780 diff --git a/resources-vault b/resources-vault index 06d26e6..dfaff6a 160000 --- a/resources-vault +++ b/resources-vault @@ -1 +1 @@ -Subproject commit 06d26e676a759721e7c17f6f4c182b0e203f0a5b +Subproject commit dfaff6adc6287587b3a27e908267af665e85c8a4 diff --git a/wallet-enterprise b/wallet-enterprise index 8ab3d74..3d3873e 160000 --- a/wallet-enterprise +++ b/wallet-enterprise @@ -1 +1 @@ -Subproject commit 8ab3d74ada8494497f3623c4ded246d42e83ec5f +Subproject commit 3d3873e579512006affbb327ccad9a4793b7ede0 diff --git a/wallet-enterprise-configurations/ehic-issuer/src/configuration/SupportedCredentialsConfiguration/EHICSupportedCredentialSdJwt.ts b/wallet-enterprise-configurations/ehic-issuer/src/configuration/SupportedCredentialsConfiguration/EHICSupportedCredentialSdJwt.ts index aef07c5..3cc33c9 100644 --- a/wallet-enterprise-configurations/ehic-issuer/src/configuration/SupportedCredentialsConfiguration/EHICSupportedCredentialSdJwt.ts +++ b/wallet-enterprise-configurations/ehic-issuer/src/configuration/SupportedCredentialsConfiguration/EHICSupportedCredentialSdJwt.ts @@ -70,7 +70,7 @@ export class EHICSupportedCredentialSdJwt implements SupportedCredentialProtocol throw new Error("Cannot generate credential: personalIdentifier is missing"); } this.dataset = JSON.parse(fs.readFileSync('/datasets/dataset.json', 'utf-8').toString()) as any - const { claims } = this.dataset.users.filter((user: any) => user.authentication.personalIdentifier == userSession.personalIdentifier)[0]; + const { claims, authentication } = this.dataset.users.filter((user: any) => user.authentication.personalIdentifier == userSession.personalIdentifier)[0]; const payload = { "@context": ["https://www.w3.org/2018/credentials/v1"], @@ -83,7 +83,7 @@ export class EHICSupportedCredentialSdJwt implements SupportedCredentialProtocol "id": holderDID, }, "credentialStatus": { - "id": `${config.crl.url}#${(await CredentialStatusList.insert(claims.personalIdentifier)).id}`, + "id": `${config.crl.url}#${(await CredentialStatusList.insert(authentication.username, claims.personalIdentifier)).id}`, "type": "CertificateRevocationList" }, "credentialBranding": { diff --git a/wallet-enterprise-configurations/pda1-issuer/src/configuration/SupportedCredentialsConfiguration/PDA1SupportedCredentialSdJwt.ts b/wallet-enterprise-configurations/pda1-issuer/src/configuration/SupportedCredentialsConfiguration/PDA1SupportedCredentialSdJwt.ts index 57137cf..5fa759f 100644 --- a/wallet-enterprise-configurations/pda1-issuer/src/configuration/SupportedCredentialsConfiguration/PDA1SupportedCredentialSdJwt.ts +++ b/wallet-enterprise-configurations/pda1-issuer/src/configuration/SupportedCredentialsConfiguration/PDA1SupportedCredentialSdJwt.ts @@ -35,6 +35,11 @@ privateKeyContent = fs.readFileSync(privateKeyFilePath, 'utf8'); const credentialIssuerPrivateKeyJWK = JSON.parse(privateKeyContent) as crypto.JsonWebKey; const credentialIssuerPrivateKey = crypto.createPrivateKey({ key: credentialIssuerPrivateKeyJWK, format: 'jwk' }); + + +const dataset = JSON.parse(fs.readFileSync('/datasets/dataset.json', 'utf-8').toString()) as any; + + export class PDA1SupportedCredentialSdJwt implements SupportedCredentialProtocol { @@ -160,6 +165,8 @@ export class PDA1SupportedCredentialSdJwt implements SupportedCredentialProtocol console.log("Claims = ", claims) + // use the dataset to retrieve only the username based on personalIdentifier + const username = dataset.users.filter((u) => u.authentication.personalIdentifier == userSession.personalIdentifier)[0].username; const payload = { "@context": ["https://www.w3.org/2018/credentials/v1"], "type": this.getTypes(), @@ -171,7 +178,7 @@ export class PDA1SupportedCredentialSdJwt implements SupportedCredentialProtocol "id": holderDID, }, "credentialStatus": { - "id": `${config.crl.url}#${(await CredentialStatusList.insert(claims.personalIdentifier)).id}`, + "id": `${config.crl.url}#${(await CredentialStatusList.insert(username, claims.personalIdentifier)).id}`, "type": "CertificateRevocationList" }, "credentialBranding": { diff --git a/wallet-enterprise-configurations/vid-issuer/src/configuration/SupportedCredentialsConfiguration/VIDSupportedCredentialSdJwt.ts b/wallet-enterprise-configurations/vid-issuer/src/configuration/SupportedCredentialsConfiguration/VIDSupportedCredentialSdJwt.ts index 0301858..225fd35 100644 --- a/wallet-enterprise-configurations/vid-issuer/src/configuration/SupportedCredentialsConfiguration/VIDSupportedCredentialSdJwt.ts +++ b/wallet-enterprise-configurations/vid-issuer/src/configuration/SupportedCredentialsConfiguration/VIDSupportedCredentialSdJwt.ts @@ -73,7 +73,7 @@ export class VIDSupportedCredentialSdJwt implements SupportedCredentialProtocol this.dataset = JSON.parse(fs.readFileSync('/datasets/dataset.json', 'utf-8').toString()) as any; - const { claims } = this.dataset.users.filter((user: any) => user.authentication.personalIdentifier == userSession.personalIdentifier)[0]; + const { claims, authentication } = this.dataset.users.filter((user: any) => user.authentication.personalIdentifier == userSession.personalIdentifier)[0]; console.log("Vid claims = ", claims) const payload = { "@context": ["https://www.w3.org/2018/credentials/v1"], @@ -86,7 +86,7 @@ export class VIDSupportedCredentialSdJwt implements SupportedCredentialProtocol "id": holderDID, }, "credentialStatus": { - "id": `${config.crl.url}#${(await CredentialStatusList.insert(claims.personalIdentifier)).id}`, + "id": `${config.crl.url}#${(await CredentialStatusList.insert(authentication.username, claims.personalIdentifier)).id}`, "type": "CertificateRevocationList" }, "credentialBranding": { diff --git a/wallet-frontend b/wallet-frontend index cd63cc9..1c5f101 160000 --- a/wallet-frontend +++ b/wallet-frontend @@ -1 +1 @@ -Subproject commit cd63cc964fd9dfea02a7b528e5b20da9a29fa7c3 +Subproject commit 1c5f101f4679501cdfe2418da4a7b7fae98d4d76