Skip to content

Commit

Permalink
feat(IT Wallet): [SIW-729] Add mobile driving license issuing (#5323)
Browse files Browse the repository at this point in the history
## Short description
This PR adds the mobile driving license issuing. 
Some claims might not be rendered properly. Since the component which
renders the claims list needs a substantial refactor I decided to leave
it out of the scope of this PR.
See #5321.

## List of changes proposed in this pull request
- Updates the mock data required to obtain and display the credential.

## How to test
Test the mDL issuing flow.
  • Loading branch information
LazyAfternoons authored Dec 14, 2023
1 parent 7366196 commit 190d531
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions ts/features/it-wallet/saga/new/itwIssuanceSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export function* handleIssuanceChecks({

const [credentialConfigurationSchema] =
issuerConf.openid_credential_issuer.credentials_supported
.filter(_ => _.format === "vc+sd-jwt")
.filter(_ => _.credential_definition.type.includes(credentialType))
.map(_ => _.credential_definition.credentialSubject);
if (!credentialConfigurationSchema) {
Expand Down
26 changes: 22 additions & 4 deletions ts/features/it-wallet/utils/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const CREDENTIAL_ISSUER = "eFarma";
export enum CredentialType {
EUROPEAN_HEALTH_INSURANCE_CARD = "EuropeanHealthInsuranceCard",
EUROPEAN_DISABILITY_CARD = "EuropeanDisabilityCard",
DRIVING_LICENSE = "DrivingLicense",
DRIVING_LICENSE = "mDL",
PID = "PID"
}

Expand Down Expand Up @@ -124,14 +124,30 @@ export const getCredentialsCatalog = (): Array<CredentialCatalogItem> => [
]
},
{
type: CredentialType.DRIVING_LICENSE,
issuerUrl: "https://api.eudi-wallet-it-issuer.it/rp",
title: I18n.t(
"features.itWallet.verifiableCredentials.type.drivingLicense"
),
icon: "driverLicense",
incoming: true,
incoming: false,
textColor: "black",
firstLine: [],
secondLine: []
firstLine: ["given_name", "family_name"],
secondLine: ["document_number"],
order: [
"given_name",
"family_name",
"birthdate",
"issue_date",
"expiry_date",
"issuing_country",
"issuing_authority",
"document_number",
"un_distinguishing_sing",
"portrait",
"driving_privileges",
"evidence"
]
}
];

Expand All @@ -148,6 +164,8 @@ export const getImageFromCredentialType = (type: string) => {
return require("../assets/img/credentials/cards/europeanHealthInsuranceCardFront.png");
case CredentialType.PID:
return require("../assets/img/credentials/cards/pidFront.png");
case CredentialType.DRIVING_LICENSE:
return require("../assets/img/credentials/cards/drivingLicenseFront.png");
default:
return require("../assets/img/credentials/cards/default.png");
}
Expand Down

0 comments on commit 190d531

Please sign in to comment.