diff --git a/VCL/build.gradle b/VCL/build.gradle index 51fd75e..b197530 100644 --- a/VCL/build.gradle +++ b/VCL/build.gradle @@ -6,13 +6,13 @@ plugins { } android { - compileSdk 34 + compileSdk 35 namespace 'io.velocitycareerlabs' defaultConfig { minSdk 24 - targetSdk 34 - versionName "2.4.6" + targetSdk 35 + versionName "2.5.0" versionCode 142 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" @@ -217,9 +217,9 @@ repositories { */ dependencies { - implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.core:core-ktx:1.13.1' - implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3' + implementation 'com.nimbusds:nimbus-jose-jwt:9.40' //noinspection GradleDependency implementation "androidx.security:security-crypto:1.0.0" @@ -229,7 +229,7 @@ dependencies { // Required -- JUnit 4 framework testImplementation 'junit:junit:4.13.2' // Optional -- Robolectric environment - testImplementation 'androidx.test:core:1.5.0' + testImplementation 'androidx.test:core:1.6.1' testImplementation 'org.robolectric:robolectric:4.12' // Optional -- Mockito framework testImplementation "org.mockito:mockito-core:5.11.0" @@ -239,6 +239,6 @@ dependencies { // json assert testImplementation 'org.skyscreamer:jsonassert:1.5.1' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } \ No newline at end of file diff --git a/VCL/src/main/java/io/velocitycareerlabs/api/entities/VCLFinalizeOffersDescriptor.kt b/VCL/src/main/java/io/velocitycareerlabs/api/entities/VCLFinalizeOffersDescriptor.kt index 5cb91bc..2ee0b48 100644 --- a/VCL/src/main/java/io/velocitycareerlabs/api/entities/VCLFinalizeOffersDescriptor.kt +++ b/VCL/src/main/java/io/velocitycareerlabs/api/entities/VCLFinalizeOffersDescriptor.kt @@ -11,7 +11,7 @@ import org.json.JSONObject data class VCLFinalizeOffersDescriptor( val credentialManifest: VCLCredentialManifest, - val offers: VCLOffers, + val challenge: String? = null, val approvedOfferIds: List, val rejectedOfferIds: List ) { diff --git a/VCL/src/main/java/io/velocitycareerlabs/impl/data/usecases/FinalizeOffersUseCaseImpl.kt b/VCL/src/main/java/io/velocitycareerlabs/impl/data/usecases/FinalizeOffersUseCaseImpl.kt index bdd9292..530b5ec 100644 --- a/VCL/src/main/java/io/velocitycareerlabs/impl/data/usecases/FinalizeOffersUseCaseImpl.kt +++ b/VCL/src/main/java/io/velocitycareerlabs/impl/data/usecases/FinalizeOffersUseCaseImpl.kt @@ -34,7 +34,7 @@ internal class FinalizeOffersUseCaseImpl( completionBlock: (VCLResult) -> Unit ) { executor.runOnBackground { - finalizeOffersDescriptor.offers.challenge?.let { challenge -> + finalizeOffersDescriptor.challenge?.let { challenge -> this.jwtServiceRepository.generateSignedJwt( jwtDescriptor = VCLJwtDescriptor( iss = finalizeOffersDescriptor.didJwk.did, diff --git a/VCL/src/test/java/io/velocitycareerlabs/entities/VCLFinalizeOffersDescriptorTest.kt b/VCL/src/test/java/io/velocitycareerlabs/entities/VCLFinalizeOffersDescriptorTest.kt index c9e4541..e7142c2 100644 --- a/VCL/src/test/java/io/velocitycareerlabs/entities/VCLFinalizeOffersDescriptorTest.kt +++ b/VCL/src/test/java/io/velocitycareerlabs/entities/VCLFinalizeOffersDescriptorTest.kt @@ -76,7 +76,7 @@ class VCLFinalizeOffersDescriptorTest { subject = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifest, - offers = offers, + challenge = offers.challenge, approvedOfferIds = approvedOfferIds, rejectedOfferIds = rejectedOfferIds ) diff --git a/VCL/src/test/java/io/velocitycareerlabs/usecases/FinalizeOffersUseCaseTest.kt b/VCL/src/test/java/io/velocitycareerlabs/usecases/FinalizeOffersUseCaseTest.kt index 1c7652c..4eb2236 100644 --- a/VCL/src/test/java/io/velocitycareerlabs/usecases/FinalizeOffersUseCaseTest.kt +++ b/VCL/src/test/java/io/velocitycareerlabs/usecases/FinalizeOffersUseCaseTest.kt @@ -111,13 +111,13 @@ internal class FinalizeOffersUseCaseTest { finalizeOffersDescriptorFailed = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifestFailed, - offers = offers, + challenge = offers.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) finalizeOffersDescriptorPassed = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifestPassed, - offers = offers, + challenge = offers.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) diff --git a/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialDidVerifierTest.kt b/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialDidVerifierTest.kt index 748281d..75ee2cf 100644 --- a/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialDidVerifierTest.kt +++ b/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialDidVerifierTest.kt @@ -52,7 +52,7 @@ internal class CredentialDidVerifierTest { ) finalizeOffersDescriptorOfNotaryIssuer = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifestFromNotaryIssuer, - offers = OffersMock, + challenge = OffersMock.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) @@ -64,7 +64,7 @@ internal class CredentialDidVerifierTest { ) finalizeOffersDescriptorOfRegularIssuer = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifestFromRegularIssuer, - offers = OffersMock, + challenge = OffersMock.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) diff --git a/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialIssuerVerifierTest.kt b/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialIssuerVerifierTest.kt index b8b674f..9de8232 100644 --- a/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialIssuerVerifierTest.kt +++ b/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialIssuerVerifierTest.kt @@ -78,7 +78,7 @@ internal class CredentialIssuerVerifierTest { ) finalizeOffersDescriptorWithoutPermittedServices = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifestWithoutPermittedServices, - offers = OffersMock, + challenge = OffersMock.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) @@ -90,7 +90,7 @@ internal class CredentialIssuerVerifierTest { ) finalizeOffersDescriptorOfNotaryIssuer = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifestFromNotaryIssuer, - offers = OffersMock, + challenge = OffersMock.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) @@ -102,7 +102,7 @@ internal class CredentialIssuerVerifierTest { ) finalizeOffersDescriptorOfRegularIssuer = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifestFromRegularIssuer, - offers = OffersMock, + challenge = OffersMock.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) @@ -114,7 +114,7 @@ internal class CredentialIssuerVerifierTest { ) finalizeOffersDescriptorOfIdentityIssuer = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifestFromIdentityIssuer, - offers = OffersMock, + challenge = OffersMock.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) @@ -131,7 +131,7 @@ internal class CredentialIssuerVerifierTest { ) finalizeOffersDescriptorOfMicrosoftQa = VCLFinalizeOffersDescriptor( credentialManifest = CredentialManifestForValidCredentialMicrsoftQa, - offers = OffersMock, + challenge = OffersMock.challenge, approvedOfferIds = listOf(), rejectedOfferIds = listOf() ) diff --git a/app/build.gradle b/app/build.gradle index 2368bba..4c60a5d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,13 +5,13 @@ plugins { } android { - compileSdk 34 + compileSdk 35 // buildToolsVersion "30.0.3" defaultConfig { applicationId "com.vcl.wallet" minSdk 24 - targetSdk 34 + targetSdk 35 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -43,15 +43,15 @@ android { } dependencies { - implementation 'androidx.core:core-ktx:1.12.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.11.0' + implementation 'androidx.core:core-ktx:1.13.1' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' // Must: be added: - implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3' + implementation 'com.nimbusds:nimbus-jose-jwt:9.40' implementation project(':VCL') // implementation "io.velocitycareerlabs:vcl:x.y.z" diff --git a/app/src/main/java/com/vcl/wallet/MainActivity.kt b/app/src/main/java/com/vcl/wallet/MainActivity.kt index 72e417d..98cd4eb 100644 --- a/app/src/main/java/com/vcl/wallet/MainActivity.kt +++ b/app/src/main/java/com/vcl/wallet/MainActivity.kt @@ -342,7 +342,7 @@ class MainActivity : AppCompatActivity() { val approvedRejectedOfferIds = Utils.getApprovedRejectedOfferIdsMock(offers) val finalizeOffersDescriptor = VCLFinalizeOffersDescriptor( credentialManifest = credentialManifest, - offers = offers, + challenge = offers.challenge, approvedOfferIds = approvedRejectedOfferIds.first, rejectedOfferIds = approvedRejectedOfferIds.second )