@@ -131,6 +131,7 @@ public KycExchangeResult doKycExchange(String relyingPartyId, String clientId, K
131131 setClaims ((VerifiedKycExchangeDto ) kycExchangeDto , idaKycExchangeRequest );
132132 }
133133
134+ log .info ("Sending the kyc exchange request : {}" , idaKycExchangeRequest );
134135
135136 //set signature header, body and invoke kyc exchange endpoint
136137 String requestBody = objectMapper .writeValueAsString (idaKycExchangeRequest );
@@ -278,11 +279,15 @@ private KycAuthResult doKycAuthentication(String relyingPartyId, String clientId
278279 IdaResponseWrapper <IdaKycAuthResponse > responseWrapper = responseEntity .getBody ();
279280 if (responseWrapper !=null && responseWrapper .getResponse () != null && responseWrapper .getResponse ().isKycStatus () &&
280281 responseWrapper .getResponse ().getKycToken () != null ) {
281- return claimsMetadataRequired ? (new KycAuthResult (responseWrapper .getResponse ().getKycToken (),
282+ if (claimsMetadataRequired && responseWrapper .getResponse ().getVerifiedClaimsMetadata () != null ) {
283+ return new KycAuthResult (responseWrapper .getResponse ().getKycToken (),
284+ responseWrapper .getResponse ().getAuthToken (),
285+ buildVerifiedClaimsMetadata (responseWrapper .getResponse ().getVerifiedClaimsMetadata ())
286+ );
287+ }
288+ return new KycAuthResult (responseWrapper .getResponse ().getKycToken (),
282289 responseWrapper .getResponse ().getAuthToken (),
283- buildVerifiedClaimsMetadata (responseWrapper .getResponse ().getVerifiedClaimsMetadata ())))
284- : (new KycAuthResult (responseWrapper .getResponse ().getKycToken (),
285- responseWrapper .getResponse ().getAuthToken ()));
290+ buildVerifiedClaimsMetadata (null ) );
286291 }
287292 assert Objects .requireNonNull (responseWrapper ).getResponse () != null ;
288293 log .error ("Error response received from IDA KycStatus : {} && Errors: {}" ,
0 commit comments