From c45a4a51e79e89ecbb15664c5237087fb2514353 Mon Sep 17 00:00:00 2001 From: Filippos Sakellaropoulos Date: Mon, 7 Oct 2024 22:34:39 +0300 Subject: [PATCH] Update OpenID4VCI version to 0.6.0 --- Package.resolved | 4 ++-- Package.swift | 2 +- Sources/EudiWalletKit/Services/OpenId4VpService.swift | 2 +- changelog.md | 6 ++++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Package.resolved b/Package.resolved index e010591..f6d0008 100644 --- a/Package.resolved +++ b/Package.resolved @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-openid4vci-swift.git", "state" : { - "revision" : "78fbd3f8599537649dcea3331d8b54ea00fe2551", - "version" : "0.5.0" + "revision" : "aa315bc7c81e0ac6b82f3825f45e4401c65a0e41", + "version" : "0.6.0" } }, { diff --git a/Package.swift b/Package.swift index 0cbfe28..9280e59 100644 --- a/Package.swift +++ b/Package.swift @@ -18,7 +18,7 @@ let package = Package( .package(url: "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-iso18013-data-transfer.git", exact: "0.3.1"), .package(url: "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-wallet-storage.git", exact: "0.2.8"), .package(url: "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-siop-openid4vp-swift.git", exact: "0.4.0"), - .package(url: "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-openid4vci-swift.git", exact: "0.5.0"), + .package(url: "https://github.com/eu-digital-identity-wallet/eudi-lib-ios-openid4vci-swift.git", exact: "0.6.0"), ], targets: [ // Targets are the basic building blocks of a package, defining a module or a test suite. diff --git a/Sources/EudiWalletKit/Services/OpenId4VpService.swift b/Sources/EudiWalletKit/Services/OpenId4VpService.swift index 2cff369..ab81f66 100644 --- a/Sources/EudiWalletKit/Services/OpenId4VpService.swift +++ b/Sources/EudiWalletKit/Services/OpenId4VpService.swift @@ -129,7 +129,7 @@ public class OpenId4VpService: PresentationService { fileprivate func SendVpToken(_ vpTokenStr: String?, _ pd: PresentationDefinition, _ resolved: ResolvedRequestData, _ onSuccess: ((URL?) -> Void)?) async throws { let consent: ClientConsent = if let vpTokenStr { - .vpToken(vpToken: .init(verifiablePresentations: [.generic(vpTokenStr)]), presentationSubmission: .init(id: UUID().uuidString, definitionID: pd.id, descriptorMap: pd.inputDescriptors.filter { $0.formatContainer?.formats.contains(where: { $0["designation"].string?.lowercased() == "mso_mdoc" }) ?? false }.map { DescriptorMap(id: $0.id, format: "mso_mdoc", path: "$")} )) + .vpToken(vpToken: .init(apu: mdocGeneratedNonce.base64urlEncode, verifiablePresentations: [.msoMdoc(vpTokenStr)]), presentationSubmission: .init(id: UUID().uuidString, definitionID: pd.id, descriptorMap: pd.inputDescriptors.filter { $0.formatContainer?.formats.contains(where: { $0["designation"].string?.lowercased() == "mso_mdoc" }) ?? false }.map { DescriptorMap(id: $0.id, format: "mso_mdoc", path: "$")} )) } else { .negative(message: "Rejected") } // Generate a direct post authorisation response let response = try AuthorizationResponse(resolvedRequest: resolved, consent: consent, walletOpenId4VPConfig: getWalletConf(verifierApiUrl: openId4VpVerifierApiUri, verifierLegalName: openId4VpVerifierLegalName)) diff --git a/changelog.md b/changelog.md index 0e09294..c6e4db9 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +## v0.7.0 +- Updated OpenID4VCI to version 0.6.0 + +## v0.6.9 +- Fill document display name in [DocElementsViewModel](https://eu-digital-identity-wallet.github.io/eudi-lib-ios-wallet-kit/documentation/eudiwalletkit/docelementsviewmodel/) + ## v0.6.8 - Updated OpenID4VCI to version 0.5.0 - Updated OpenID4VP to version 0.4.0