Skip to content

Commit

Permalink
Support mdl presentation (#69)
Browse files Browse the repository at this point in the history
* Introduced verification by mdl, refactored selectable attributes component to be agnostic of model

* Moved presentation purpose out of model, it is specified per presentation case

* Renamed component create-a-scenario

---------

Co-authored-by: Vafeiadis Nikos <[email protected]>
  • Loading branch information
vafeini and vafeini authored Jun 25, 2024
1 parent 9c01f02 commit 808a877
Show file tree
Hide file tree
Showing 38 changed files with 559 additions and 851 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verifier-ui",
"version": "0.3.0",
"version": "0.4.0-SNAPSHOT",
"scripts": {
"ng": "ng",
"start": "npm run config && ng serve --proxy-config src/proxy.conf.json",
Expand Down
24 changes: 16 additions & 8 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,34 @@ import { NavigateService } from './core/services/navigate.service';
const routes: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', loadComponent: () => import('./features/home/components/home/home.component').then(c => c.HomeComponent) },
{ path: 'presentation',
{ path: 'custom-request',
loadChildren: () => import('./features/presentation-definition/presentation-definition.module').
then(m => m.PresentationDefinitionModule )},
{ path: 'siop',
loadChildren: () => import('./features/siop/siop.module').
then(m => m.SIOPModule )},
{ path: 'cbor',
// { path: 'siop',
// loadChildren: () => import('./features/siop/siop.module').
// then(m => m.SIOPModule )},
{ path: 'pid-full',
loadChildren: () => import('./features/cbor/cbor.module').
then(m => m.CborModule )},
{ path: 'cbor-selectable',
loadChildren: () => import('./features/siop-custom/cbor-selectable.module').
then(m => m.SiopCustomModule )},
{ path: 'age-over-18',
loadChildren: () => import('@features/selectable-presentation/selectable-presentation.module').
then(m => m.SelectablePresentationModule )},
{ path: 'pid-age-over-18',
loadChildren: () => import('./features/cbor/cbor.module').
then(m => m.CborModule )
},
{ path: 'age-attestation',
loadChildren: () => import('./features/cbor/cbor.module').
then(m => m.CborModule )
},
{ path: 'mdl-selectable',
loadChildren: () => import('@features/selectable-presentation/selectable-presentation.module').
then(m => m.SelectablePresentationModule ),
},
{ path: 'mdl-full',
loadChildren: () => import('./features/cbor/cbor.module').
then(m => m.CborModule )
},
{
path: 'get-wallet-code',
loadComponent: () => import('./features/wallet-redirect/wallet-redirect.component').then(c => c.WalletRedirectComponent),
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/data/age_attestation_pd.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Presentation } from '@app/features/siop-custom/models/Presentation';
import { Presentation } from '@features/selectable-presentation/models/Presentation';

/* eslint-disable quotes */
export const AGE_ATTESTATION_OVER_18_PD: Presentation = {
Expand Down
285 changes: 0 additions & 285 deletions src/app/core/data/cbor_fields.ts

This file was deleted.

42 changes: 42 additions & 0 deletions src/app/core/data/mdl_msoMdoc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {MsoMdoc} from "@core/models/msoMdoc";

/* eslint-disable quotes */
export const MDL_MSO_MDOC: MsoMdoc = {
name: 'Mobile Driving Licence',
doctype: 'org.iso.18013.5.1.mDL',
namespace: 'org.iso.18013.5.1',
attributes: [
{ value: 'family_name', text: 'Family name' },
{ value: 'given_name', text: 'Given name'},
{ value: 'birth_date', text: 'Birthdate'},
{ value: 'issue_date', text: 'Issue date'},
{ value: 'expiry_date', text: 'Expiry date'},
{ value: 'age_over_18', text: 'Age over 18'},
{ value: 'age_over_21', text: 'Age over 21'},
{ value: 'age_in_years', text: 'Age in years'},
{ value: 'age_birth_year', text: 'Age birth year'},
{ value: 'issuing_authority', text: 'Issuing authority'},
{ value: 'document_number', text: 'Document number'},
{ value: 'portrait', text: 'Portrait'},
{ value: 'driving_privileges', text: 'Driving privileges'},
{ value: 'un_distinguishing_sign', text: 'Un-distinguishing sign'},
{ value: 'administrative_number', text: 'Administrative number'},
{ value: 'sex', text: 'Sex'},
{ value: 'height', text: 'Height'},
{ value: 'weight', text: 'Weight'},
{ value: 'eye_colour', text: 'Eye colour'},
{ value: 'hair_colour', text: 'Hair colour'},
{ value: 'birth_place', text: 'Birth place'},
{ value: 'resident_address', text: 'Resident address'},
{ value: 'portrait_capture_date', text: 'Portrait capture date'},
{ value: 'nationality', text: 'Nationality'},
{ value: 'resident_city', text: 'Resident city'},
{ value: 'resident_state', text: 'Resident state'},
{ value: 'resident_postal_code', text: 'Resident postal code'},
{ value: 'resident_country', text: 'Resident country'},
{ value: 'family_name_national_character', text: 'Family name national character'},
{ value: 'given_name_national_character', text: 'Given name national character'},
{ value: 'signature_usual_mark', text: 'Signature usual mark'}]
}


Loading

0 comments on commit 808a877

Please sign in to comment.