Skip to content

Commit 1b4a1e4

Browse files
authored
Merge branch 'main' into release/0.7.0
2 parents e531f2a + 9181fa4 commit 1b4a1e4

62 files changed

Lines changed: 853 additions & 226 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish-to-container-registry.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
# multi-platform images and export cache
2727
# https://github.com/docker/setup-buildx-action
2828
- name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v3.3.0
29+
uses: docker/setup-buildx-action@v3.10.0
3030

3131
# Login against a Docker registry except on PR
3232
# https://github.com/docker/login-action
3333
- name: Log into registry ${{ env.REGISTRY }}
3434
if: github.event_name != 'pull_request'
35-
uses: docker/login-action@v3.2.0
35+
uses: docker/login-action@v3.4.0
3636
with:
3737
registry: ${{ env.REGISTRY }}
3838
username: ${{ github.actor }}
@@ -42,15 +42,15 @@ jobs:
4242
# https://github.com/docker/metadata-action
4343
- name: Extract Docker metadata
4444
id: meta
45-
uses: docker/metadata-action@v5.5.1
45+
uses: docker/metadata-action@v5.7.0
4646
with:
4747
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4848

4949
# Build and push Docker image with Buildx (don't push on PR)
5050
# https://github.com/docker/build-push-action
5151
- name: Build and push Docker image
5252
id: build-and-push
53-
uses: docker/build-push-action@v6.2.0
53+
uses: docker/build-push-action@v6.15.0
5454
with:
5555
context: .
5656
push: ${{ github.event_name != 'pull_request' }}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@
2929
"@types/codemirror": "^5.60.7",
3030
"@types/crypto-js": "^4.1.1",
3131
"@types/uuid": "10.0.0",
32+
"angularx-qrcode": "^19.0.0",
3233
"bignumber.js": "^9.1.2",
3334
"buffer": "^6.0.3",
3435
"cbor-x": "^1.6.0",
3536
"codemirror": "^6.0.1",
3637
"crypto-js": "^4.1.1",
3738
"jsonpath-plus": "^9.0.0",
3839
"jwt-decode": "^3.0.0",
40+
"ngx-toastr": "16.2.0",
3941
"nofilter": "^4.0.2",
40-
"angularx-qrcode": "^19.0.0",
4142
"rxjs": "~7.8.0",
4243
"stream-browserify": "^3.0.0",
4344
"thememirror": "^2.0.1",
4445
"tslib": "^2.3.0",
45-
"zone.js": "~0.15.0",
46-
"ngx-toastr": "16.2.0"
46+
"zone.js": "~0.15.0"
4747
},
4848
"devDependencies": {
4949
"@angular-devkit/build-angular": "^19.1.4",
@@ -75,4 +75,4 @@
7575
"stylelint-order": "^6.0.3",
7676
"typescript": "~5.5.4"
7777
}
78-
}
78+
}

src/app/core/constants/attestation-definitions.ts

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const PHOTO_ID_ATTESTATION: AttestationDefinition = {
9595
{ identifier: 'portrait', attribute: 'Portrait'},
9696
{ identifier: 'portrait_capture_date', attribute: 'Portrait capture date'},
9797
{ identifier: 'person_id', attribute: 'Person id'},
98-
{ identifier: 'family_name', attribute: 'Family_name'},
98+
{ identifier: 'family_name', attribute: 'Family name'},
9999
{ identifier: 'given_name', attribute: 'Given name'},
100100
{ identifier: 'birth_date', attribute: 'Birth date'},
101101
{ identifier: 'age_over_18', attribute: 'Age over 18'},
@@ -127,10 +127,41 @@ export const PHOTO_ID_ATTESTATION: AttestationDefinition = {
127127
]
128128
}
129129

130+
export const EHIC_ATTESTATION: AttestationDefinition = {
131+
name: "European Health Insurance Card (EHIC)",
132+
type: AttestationType.EHIC,
133+
dataSet: [
134+
{ identifier: "credential_holder", attribute: "Credential holder" },
135+
{ identifier: "subject", attribute: "Subject" },
136+
{ identifier: 'social_security_pin', attribute: 'Social security PIN'},
137+
{ identifier: "starting_date", attribute: "Starting date" },
138+
{ identifier: "ending_date", attribute: "Ending date" },
139+
{ identifier: 'document_id', attribute: 'Document identifier' },
140+
{ identifier: "competent_institution", attribute: 'Competent institution' }
141+
],
142+
}
143+
144+
export const PDA1_ATTESTATION: AttestationDefinition = {
145+
name: "Portable Document A1 (PDA1)",
146+
type: AttestationType.PDA1,
147+
dataSet: [
148+
{ identifier: "credential_holder", attribute: "Credential holder" },
149+
{ identifier: 'social_security_pin', attribute: 'Social security PIN' },
150+
{ identifier: "nationality", attribute: "Nationality" },
151+
{ identifier: "employment_details", attribute: "Employment details" },
152+
{ identifier: 'places_of_work', attribute: 'Places of work' },
153+
{ identifier: 'legislation', attribute: 'Legislation' },
154+
{ identifier: 'status_confirmation', attribute: 'Status confirmation'},
155+
{ identifier: 'document_id', attribute: 'Document identifier'},
156+
{ identifier: "competent_institution", attribute: "Competent institution"},
157+
]
158+
}
159+
130160
export const SUPPORTED_ATTESTATIONS: { [id: string]: AttestationDefinition } = {
131161
"pid": PID_ATTESTATION,
132162
"mdl": MDL_ATTESTATION,
133163
"photo_id": PHOTO_ID_ATTESTATION,
134164
"age_over_18": AGE_OVER_18_ATTESTATION,
165+
"ehic": EHIC_ATTESTATION,
166+
"pda1": PDA1_ATTESTATION
135167
}
136-

src/app/core/constants/attestations-per-format.ts

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Attestation, MsoMdocAttestation, SdJwtVcAttestation} from "@core/models/attestation/Attestations";
2-
import {AGE_OVER_18_ATTESTATION, MDL_ATTESTATION, PHOTO_ID_ATTESTATION, PID_ATTESTATION} from "@core/constants/attestation-definitions";
2+
import {AGE_OVER_18_ATTESTATION, EHIC_ATTESTATION, MDL_ATTESTATION, PDA1_ATTESTATION, PHOTO_ID_ATTESTATION, PID_ATTESTATION} from "@core/constants/attestation-definitions";
33
import {AttestationFormat} from "@core/models/attestation/AttestationFormat";
44
import {AttestationType} from "@core/models/attestation/AttestationType";
55
import {DataElement} from "@core/models/attestation/AttestationDefinition";
@@ -57,8 +57,46 @@ export const PHOTO_ID_MSO_MDOC: MsoMdocAttestation = {
5757
claimQuery: (attribute: DataElement) => { return msoMdocClaimQuery('org.iso.23220.photoid.1', attribute.identifier) }
5858
}
5959

60+
/*---- EHIC INSTANCES PER FORMAT ----*/
61+
export const EHIC_MSO_MDOC: MsoMdocAttestation = {
62+
format: AttestationFormat.MSO_MDOC,
63+
attestationDef: EHIC_ATTESTATION,
64+
doctype: 'eu.europa.ec.eudi.ehic.1',
65+
namespace: 'eu.europa.ec.eudi.ehic.1',
66+
attributePath: (attribute: DataElement) => { return msoMdocAttributePath(attribute, 'eu.europa.ec.eudi.ehic.1') },
67+
claimPath: (attribute: DataElement) => { return { namespace: 'eu.europa.ec.eudi.ehic.1', claim_name: attribute.identifier } }
68+
}
69+
export const EHIC_SD_JWT_VC: SdJwtVcAttestation = {
70+
format: AttestationFormat.SD_JWT_VC,
71+
attestationDef: EHIC_ATTESTATION,
72+
vct: 'urn:eu.europa.ec.eudi:ehic:1',
73+
attributePath: (attribute: DataElement) => { return `$.${sdJwtVcAttributePath(attribute, AttestationType.EHIC)}` },
74+
claimPath: (attribute: DataElement) => { return { path: sdJwtVcAttributePath(attribute, AttestationType.EHIC).split('.') } }
75+
}
76+
77+
/*---- PDA1 INSTANCES PER FORMAT ----*/
78+
export const PDA1_MSO_MDOC: MsoMdocAttestation = {
79+
format: AttestationFormat.MSO_MDOC,
80+
attestationDef: PDA1_ATTESTATION,
81+
doctype: 'eu.europa.ec.eudi.pda1.1',
82+
namespace: 'eu.europa.ec.eudi.pda1.1',
83+
attributePath: (attribute: DataElement) => { return msoMdocAttributePath(attribute, 'eu.europa.ec.eudi.pda1.1') },
84+
claimPath: (attribute: DataElement) => { return { namespace: 'eu.europa.ec.eudi.pda1.1', claim_name: attribute.identifier } }
85+
}
86+
export const PDA1_SD_JWT_VC: SdJwtVcAttestation = {
87+
format: AttestationFormat.SD_JWT_VC,
88+
attestationDef: PDA1_ATTESTATION,
89+
vct: 'urn:eu.europa.ec.eudi:pda1:1',
90+
attributePath: (attribute: DataElement) => { return `$.${sdJwtVcAttributePath(attribute, AttestationType.PDA1)}` },
91+
claimPath: (attribute: DataElement) => { return { path: sdJwtVcAttributePath(attribute, AttestationType.PDA1).split('.') } }
92+
}
93+
6094
function msoMdocAttributePath(attribute: DataElement, namespace: string): string {
61-
return '$[\'' + namespace + '\'][\'' + attribute.identifier + '\']'
95+
if(attribute.identifier.includes('.')) {
96+
return '$[\'' + namespace + '\'][\'' + attribute.identifier.split('.').join('\'][\'') + '\']'
97+
} else {
98+
return '$[\'' + namespace + '\'][\'' + attribute.identifier + '\']'
99+
}
62100
}
63101

64102
function sdJwtVcAttributePath(attribute: DataElement, attestationType: AttestationType): string {
@@ -93,8 +131,8 @@ export const PID_SD_JWT_VC_ATTRIBUTE_MAP: { [id: string]: string } = {
93131
}
94132

95133
export const ATTESTATIONS_BY_FORMAT: { [id: string]: Attestation[] } = {
96-
"mso_mdoc": [PID_MSO_MDOC, MDL_MSO_MDOC, PHOTO_ID_MSO_MDOC, AGE_OVER_18_MSO_MDOC],
97-
"vc+sd-jwt": [PID_SD_JWT_VC]
134+
"mso_mdoc": [PID_MSO_MDOC, MDL_MSO_MDOC, PHOTO_ID_MSO_MDOC, AGE_OVER_18_MSO_MDOC, EHIC_MSO_MDOC, PDA1_MSO_MDOC],
135+
"vc+sd-jwt": [PID_SD_JWT_VC, EHIC_SD_JWT_VC, PDA1_SD_JWT_VC]
98136
}
99137

100138
export const getAttestationByFormatAndType =

src/app/core/constants/general.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export const ACTIVE_TRANSACTION = 'ACTIVE_TRANSACTION';
22
export const SCHEME = 'scheme';
33
export const DEFAULT_SCHEME = 'eudi-openid4vp://';
4+
export const ISSUER_CHAIN = 'ISSUER_CHAIN';

src/app/core/layout/wallet-layout/wallet-layout-header/wallet-layout-header.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@
1313
>Change default scheme</a
1414
>
1515
</button>
16+
<button mat-menu-item>
17+
<a id="issuerChain" (click)="changeIssuerChain()"
18+
>Configure issuer chain</a
19+
>
20+
</button>
1621
</mat-menu>
1722
</header>

src/app/core/layout/wallet-layout/wallet-layout-header/wallet-layout-header.component.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
@use "/src/template" as temp;
2+
@use "sass:map";
23

34
:host {
45
border: none;
56
border-bottom: 1px;
6-
border-bottom-color: map-get(
7-
map-get(map-get(temp.$palette, general), divider),
7+
border-bottom-color: map.get(
8+
map.get(map.get(temp.$palette, general), divider),
89
dark
910
);
1011
border-bottom-style: solid;

src/app/core/layout/wallet-layout/wallet-layout-header/wallet-layout-header.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { MatToolbarModule } from '@angular/material/toolbar';
77
import { OpenLogsComponent } from "@shared/elements/open-logs/open-logs.component";
88
import { MatDialog, MatDialogModule } from "@angular/material/dialog";
99
import {InputSchemeComponent} from "@shared/elements/input-scheme/input-scheme.component";
10+
import { IssuerChainComponent } from '@app/shared/elements/trusted-issuer/issuer-chain.component';
1011

1112
@Component({
1213
selector: 'vc-wallet-layout-header',
@@ -23,7 +24,7 @@ import {InputSchemeComponent} from "@shared/elements/input-scheme/input-scheme.c
2324
export class WalletLayoutHeaderComponent {
2425
constructor (private readonly navigateService: NavigateService) {}
2526

26-
private dialog: MatDialog = inject(MatDialog);
27+
private readonly dialog: MatDialog = inject(MatDialog);
2728

2829
goHome () {
2930
this.navigateService.goHome();
@@ -48,4 +49,13 @@ export class WalletLayoutHeaderComponent {
4849
},
4950
});
5051
}
52+
53+
changeIssuerChain () {
54+
this.dialog.open(IssuerChainComponent, {
55+
data: {
56+
},
57+
height: '70%',
58+
width: '80%',
59+
});
60+
}
5161
}

src/app/core/models/FormSelectableField.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export type FormSelectableField = {
33
label: string,
44
value: string,
55
visible?: boolean
6+
nested?: FormSelectableField[]
67
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export type InitializedTransaction = {
22
client_id: string,
33
request_uri: string,
4+
request_uri_method: 'get' | 'post',
45
transaction_id: string
56
}

0 commit comments

Comments
 (0)