Skip to content

Commit 07dd5c4

Browse files
authored
feat: interoperability testing demo website (#30)
1 parent c41c11d commit 07dd5c4

Some content is hidden

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

46 files changed

+1238
-248
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ COPY ./apps/dashboard/package.json ./apps/dashboard/
2020
COPY ./apps/issuer-service/package.json ./apps/issuer-service/
2121
COPY ./apps/authorization-service/package.json ./apps/authorization-service/
2222
COPY ./apps/eductx-platform-backend/package.json ./apps/eductx-platform-backend/
23+
COPY ./apps/testing-frontend/package.json ./apps/testing-frontend/
2324

2425
##########
2526
# LIBS #

apps/authorization-service/src/plugins/auth.ts

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { util as didEbsiUtil } from '@cef-ebsi/ebsi-did-resolver';
1010
import type { PresentationDefinitionV2 } from '@sphereon/pex-models';
1111
import {
1212
COUPON_DEMO_PRESENTATION_DEFINITION,
13+
INTEROP_TEST_PRESENTATION_DEFINITION,
1314
VERIFIER_TEST_PRESENTATION_DEFINITION,
1415
} from '../utils/presentationDefinitions.js';
1516

@@ -42,6 +43,9 @@ const CONFORMANCE_TEST_SUPPORTED_CREDENTIALS: string[][] = [
4243
'VerifiableAttestation',
4344
'CTWalletSamePreAuthorisedDeferred',
4445
],
46+
['VerifiableCredential', 'VerifiableAttestation', 'InTimeIssuance'],
47+
['VerifiableCredential', 'VerifiableAttestation', 'DefferedIssuance'],
48+
['VerifiableCredential', 'VerifiableAttestation', 'PreAuthIssuance'],
4549
];
4650

4751
const SUPPORTED_CREDENTIALS: string[][] = [
@@ -134,6 +138,8 @@ export default fp(async (fastify, _) => {
134138

135139
if (scope === 'openid ver_test:vp_token') {
136140
presentationDefinition = VERIFIER_TEST_PRESENTATION_DEFINITION;
141+
} else if (scope === 'openid interop_test') {
142+
presentationDefinition = INTEROP_TEST_PRESENTATION_DEFINITION;
137143
} else if (scope.startsWith('openid custom:')) {
138144
const cacheKey = scope.replace('openid custom:', '');
139145
const cachedPresentationDefinition =

apps/authorization-service/src/utils/presentationDefinitions.ts

+52
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,55 @@ export const COUPON_DEMO_PRESENTATION_DEFINITION = {
9090
},
9191
],
9292
} as const satisfies PresentationDefinitionV2;
93+
94+
export const INTEROP_TEST_PRESENTATION_DEFINITION = {
95+
id: '666985ab-f548-4c9b-9ecb-ad67281c7a5f',
96+
format: { jwt_vp: { alg: ['ES256'] }, jwt_vp_json: { alg: ['ES256'] } },
97+
input_descriptors: [
98+
{
99+
id: 'in-time-request',
100+
format: { jwt_vc: { alg: ['ES256'] }, jwt_vc_json: { alg: ['ES256'] } },
101+
constraints: {
102+
fields: [
103+
{
104+
path: ['$.vc.type'],
105+
filter: {
106+
type: 'array',
107+
contains: { const: 'InTimeIssuance' },
108+
},
109+
},
110+
],
111+
},
112+
},
113+
{
114+
id: 'deferred-request',
115+
format: { jwt_vc: { alg: ['ES256'] }, jwt_vc_json: { alg: ['ES256'] } },
116+
constraints: {
117+
fields: [
118+
{
119+
path: ['$.vc.type'],
120+
filter: {
121+
type: 'array',
122+
contains: { const: 'DefferedIssuance' },
123+
},
124+
},
125+
],
126+
},
127+
},
128+
{
129+
id: 'pre-auth-request',
130+
format: { jwt_vc: { alg: ['ES256'] }, jwt_vc_json: { alg: ['ES256'] } },
131+
constraints: {
132+
fields: [
133+
{
134+
path: ['$.vc.type'],
135+
filter: {
136+
type: 'array',
137+
contains: { const: 'PreAuthIssuance' },
138+
},
139+
},
140+
],
141+
},
142+
},
143+
],
144+
} as const satisfies PresentationDefinitionV2;

apps/dashboard/abc.ts

-236
This file was deleted.

0 commit comments

Comments
 (0)