From 5dcdf3c30e3a1f4a3b469211136353e006cd9a23 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Tue, 1 Nov 2022 10:53:49 +0100 Subject: [PATCH] Fix #484: Consolidate ZenId verification ID Add logging --- .../impl/service/IdentityVerificationService.java | 3 ++- .../impl/service/document/DocumentProcessingService.java | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/IdentityVerificationService.java b/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/IdentityVerificationService.java index 3b57b8f63..669db5051 100644 --- a/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/IdentityVerificationService.java +++ b/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/IdentityVerificationService.java @@ -264,7 +264,8 @@ public void startVerification(OwnerId ownerId, IdentityVerificationEntity identi .map(DocumentVerificationEntity::getUploadId) .collect(Collectors.toList()); - DocumentsVerificationResult result = documentVerificationProvider.verifyDocuments(ownerId, uploadIds); + final DocumentsVerificationResult result = documentVerificationProvider.verifyDocuments(ownerId, uploadIds); + logger.info("Verified documents upload ID: {}, verification ID: {}, {}", uploadIds, result.getVerificationId(), ownerId); auditService.auditDocumentVerificationProvider(identityVerification, "Documents verified: {} for user: {}", result.getStatus(), ownerId.getUserId()); moveToPhaseAndStatus(identityVerification, IdentityVerificationPhase.DOCUMENT_VERIFICATION, IdentityVerificationStatus.IN_PROGRESS, ownerId); diff --git a/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/document/DocumentProcessingService.java b/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/document/DocumentProcessingService.java index d43fe7dca..0d33ae89b 100644 --- a/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/document/DocumentProcessingService.java +++ b/enrollment-server-onboarding/src/main/java/com/wultra/app/onboardingserver/impl/service/document/DocumentProcessingService.java @@ -431,9 +431,10 @@ private void processDocsSubmitResults(OwnerId ownerId, DocumentVerificationEntit private void verifyDocumentWithUpload(OwnerId ownerId, DocumentVerificationEntity docVerification, String uploadId) { try { - DocumentsVerificationResult docsVerificationResult = - documentVerificationProvider.verifyDocuments(ownerId, List.of(uploadId)); - docVerification.setVerificationId(docsVerificationResult.getVerificationId()); + final DocumentsVerificationResult result = documentVerificationProvider.verifyDocuments(ownerId, List.of(uploadId)); + final String verificationId = result.getVerificationId(); + logger.info("Verified document upload ID: {}, verification ID: {}, {}", uploadId, verificationId, ownerId); + docVerification.setVerificationId(verificationId); } catch (DocumentVerificationException | RemoteCommunicationException e) { logger.debug("Unable to verify document with uploadId: {}, {}", uploadId, ownerId, e); logger.warn("Unable to verify document with uploadId: {}, reason: {}, {}", uploadId, e.getMessage(), ownerId);