From 75f0bd77f2220e18862b5ec4cea4f4ace695017c Mon Sep 17 00:00:00 2001 From: Zeeshan Mehboob <82993262+zesu22@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:58:13 +0530 Subject: [PATCH] [MODIFIED] unverified essential claims exist for getClaimsExist (#962) Signed-off-by: Zeeshan Mehboob --- .../io/mosip/esignet/services/AuthorizationServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationServiceImpl.java b/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationServiceImpl.java index b6a7dde57..c485c04c4 100644 --- a/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationServiceImpl.java +++ b/oidc-service-impl/src/main/java/io/mosip/esignet/services/AuthorizationServiceImpl.java @@ -277,12 +277,12 @@ public ClaimDetailResponse getClaimDetails(String transactionId) { } //Profile update is mandated only if any essential verified claim is requested - boolean isEssentialVerifiedClaimRequested = transaction.getResolvedClaims().getUserinfo() + boolean unverifiedEssentialClaimsExist = transaction.getResolvedClaims().getUserinfo() .entrySet() .stream() .anyMatch( entry -> entry.getValue().stream() - .anyMatch(m -> (boolean) m.getOrDefault("essential", false) && m.get("verification") != null )); - claimDetailResponse.setProfileUpdateRequired(isEssentialVerifiedClaimRequested); + .anyMatch(m -> (boolean) m.getOrDefault("essential", false) && m.get("verification") == null )); + claimDetailResponse.setProfileUpdateRequired(unverifiedEssentialClaimsExist); claimDetailResponse.setClaimStatus(list); auditWrapper.logAudit(Action.CLAIM_DETAILS, ActionStatus.SUCCESS, AuditHelper.buildAuditDto(transactionId, transaction), null);