From a7008194902aad6368be32214b826f354a89eb30 Mon Sep 17 00:00:00 2001 From: Michael Avoyan Date: Thu, 29 Feb 2024 16:18:31 +0200 Subject: [PATCH] v2.3.2 logs --- VCL/build.gradle | 4 ++-- .../verifiers/CredentialIssuerVerifierImpl.kt | 17 ++++++++++++++++- .../verifiers/CredentialIssuerVerifierTest.kt | 2 -- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/VCL/build.gradle b/VCL/build.gradle index c1f965c..2de4c28 100644 --- a/VCL/build.gradle +++ b/VCL/build.gradle @@ -13,8 +13,8 @@ android { defaultConfig { minSdk 24 targetSdk 33 - versionName "2.3.1" - versionCode 131 + versionName "2.3.2" + versionCode 132 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" } diff --git a/VCL/src/main/java/io/velocitycareerlabs/impl/data/verifiers/CredentialIssuerVerifierImpl.kt b/VCL/src/main/java/io/velocitycareerlabs/impl/data/verifiers/CredentialIssuerVerifierImpl.kt index 4602cb6..3f1356e 100644 --- a/VCL/src/main/java/io/velocitycareerlabs/impl/data/verifiers/CredentialIssuerVerifierImpl.kt +++ b/VCL/src/main/java/io/velocitycareerlabs/impl/data/verifiers/CredentialIssuerVerifierImpl.kt @@ -254,7 +254,12 @@ internal class CredentialIssuerVerifierImpl( // https://velocitycareerlabs.atlassian.net/browse/VL-6178?focusedCommentId=46933 // https://velocitycareerlabs.atlassian.net/browse/VL-6988 // if (jwtCredential.iss == did) - if (Utils.getCredentialIssuerId(jwtCredential) == did) { + val credentialIssuerId = Utils.getCredentialIssuerId(jwtCredential) + VCLLog.d( + TAG, + "Comparing credentialIssuerId: ${credentialIssuerId ?: ""} with did: $did" + ) + if (credentialIssuerId == did) { isCredentialVerified = true } else { globalError = @@ -263,11 +268,21 @@ internal class CredentialIssuerVerifierImpl( } ?: run { globalError = VCLError(errorCode = VCLErrorCode.IssuerRequiresNotaryPermission.value) + + VCLLog.e( + TAG, + "DID NOT FOUND for K = $K and credentialSubject = $credentialSubject" + ) } } ?: run { // When K is null, the credential will pass these checks: // https://velocitycareerlabs.atlassian.net/browse/VL-6181?focusedCommentId=44343 isCredentialVerified = true + + VCLLog.d( + TAG, + "Key for primary organization NOT FOUND for active context:\n$activeContext" + ) } } } diff --git a/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialIssuerVerifierTest.kt b/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialIssuerVerifierTest.kt index a4db9b3..7aee2f7 100644 --- a/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialIssuerVerifierTest.kt +++ b/VCL/src/test/java/io/velocitycareerlabs/verifiers/CredentialIssuerVerifierTest.kt @@ -32,8 +32,6 @@ import org.junit.Before import org.junit.Test internal class CredentialIssuerVerifierTest { - val TAG = CredentialIssuerVerifierTest::class.simpleName - private lateinit var subject1: CredentialIssuerVerifier private lateinit var subject2: CredentialIssuerVerifier private lateinit var subject3: CredentialIssuerVerifier