From 0bd4364e34468dead189d050debab78d1cda8164 Mon Sep 17 00:00:00 2001 From: Ryan Tate Date: Tue, 22 Oct 2024 13:13:10 -0700 Subject: [PATCH] OID4VP (#37) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * oid4vp integration Signed-off-by: Ryan Tate * add sd jwt to credential pack Signed-off-by: Ryan Tate * update latest mobile-sdk-rs snapshot Signed-off-by: Ryan Tate * use startsWith for prefix instead of contains Signed-off-by: Ryan Tate * OID4VP UI (#46) This implements the UI for the OID4VP flow and adds an error page * List VC Playground Credentials (#47) This refactors the credential display components to make them compatible with generic credential types and finishes the OID4VP and OID4VCI integrations. --------- Signed-off-by: Ryan Tate Co-authored-by: Juliano Cézar Chagas Tavares --- .idea/inspectionProfiles/Project_Default.xml | 5 + MobileSdk/build.gradle.kts | 210 ++++--- .../com/spruceid/mobile/sdk/Credential.kt | 25 + .../com/spruceid/mobile/sdk/CredentialPack.kt | 34 +- .../com/spruceid/mobile/sdk/ui/BaseCard.kt | 6 +- example/.idea/runConfigurations.xml | 13 + example/build.gradle.kts | 2 + .../ExampleInstrumentedTest.kt | 6 +- .../spruceid/mobilesdkexample/ErrorView.kt | 202 +++++++ .../spruceid/mobilesdkexample/LoadingView.kt | 2 - .../spruceid/mobilesdkexample/MainActivity.kt | 40 +- .../credentials/AchievementCredentialItem.kt | 479 +++++++++++++++ .../credentials/AddToWalletView.kt | 147 +++++ .../credentials/CredentialDate.kt | 51 ++ .../credentials/CredentialImage.kt | 43 ++ .../credentials/CredentialObjectDisplayer.kt | 198 +++++++ .../credentials/GenericCredentialItem.kt | 507 ++++++++++++++++ .../credentials/ICredentialView.kt | 17 + .../mobilesdkexample/navigation/Screen.kt | 10 +- .../navigation/SetupNavGraph.kt | 85 ++- .../mobilesdkexample/ui/theme/Color.kt | 15 +- .../mobilesdkexample/utils/SmallVC.kt | 31 - .../spruceid/mobilesdkexample/utils/Utils.kt | 129 +++- .../spruceid/mobilesdkexample/utils/VCs.kt | 312 ---------- .../mobilesdkexample/verifier/Loader.kt | 2 +- .../verifier/VerifierSuccessView.kt | 2 +- .../mobilesdkexample/verifier/VerifyDLView.kt | 4 +- .../mobilesdkexample/verifier/VerifyEAView.kt | 4 +- .../mobilesdkexample/verifier/VerifyVCView.kt | 4 +- .../VerificationActivityLogScreen.kt | 5 - .../wallet/AchievementCredentialItem.kt | 365 ------------ .../wallet/AddToWalletView.kt | 135 ----- .../mobilesdkexample/wallet/DispatchQRView.kt | 44 +- .../wallet/GenericCredentialListItem.kt | 443 -------------- .../wallet/HandleOID4VPView.kt | 561 ++++++++++++++++++ .../mobilesdkexample/wallet/OID4VCI.kt | 50 +- .../mobilesdkexample/wallet/ShareView.kt | 1 + .../mobilesdkexample/wallet/WalletHomeView.kt | 186 +++--- .../mobilesdkexample/wallet/WalletUtils.kt | 77 --- .../res/drawable/add_first_credential.xml | 12 + example/src/main/res/drawable/collapse.xml | 9 + example/src/main/res/drawable/error.xml | 9 + example/src/main/res/drawable/expand.xml | 9 + example/src/main/res/values/colors.xml | 14 + example/src/main/res/values/strings.xml | 4 + .../mobilesdkexample/ExampleUnitTest.kt | 3 +- 46 files changed, 2812 insertions(+), 1700 deletions(-) create mode 100644 example/.idea/runConfigurations.xml create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/ErrorView.kt create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/credentials/AchievementCredentialItem.kt create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/credentials/AddToWalletView.kt create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/credentials/CredentialDate.kt create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/credentials/CredentialImage.kt create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/credentials/CredentialObjectDisplayer.kt create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/credentials/GenericCredentialItem.kt create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/credentials/ICredentialView.kt delete mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/utils/SmallVC.kt delete mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/utils/VCs.kt delete mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/wallet/AchievementCredentialItem.kt delete mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/wallet/AddToWalletView.kt delete mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/wallet/GenericCredentialListItem.kt create mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/wallet/HandleOID4VPView.kt delete mode 100644 example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletUtils.kt create mode 100644 example/src/main/res/drawable/add_first_credential.xml create mode 100644 example/src/main/res/drawable/collapse.xml create mode 100644 example/src/main/res/drawable/error.xml create mode 100644 example/src/main/res/drawable/expand.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 6195b36..e0da3ee 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -3,15 +3,19 @@