From a4bfb6a5aed16784fb14d8ece7bf905e21c1a0f9 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Fri, 11 Mar 2022 08:15:39 +0100 Subject: chore(matching): add common log-messages for register results during matching operations --- .../auth/eidas/v2/service/RegisterSearchService.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'modules/authmodule-eIDAS-v2') diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java index d4ebae04..5e1e4839 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java @@ -34,7 +34,9 @@ import lombok.extern.slf4j.Slf4j; @Service("registerSearchService") public class RegisterSearchService { - private final IZmrClient zmrClient; + private static final String LOG_MSG_RESULTS = "Matching operation: {} results: ZMR: {} | ERnP: {}"; + + private final IZmrClient zmrClient; private final IErnpClient ernpClient; private final List handlers; @@ -85,6 +87,9 @@ public class RegisterSearchService { final ErnpRegisterResult resultsErnp = ernpClient.searchWithPersonIdentifier( eidasData.getPseudonym(), eidasData.getCitizenCountryCode()); + log.debug(LOG_MSG_RESULTS, "seachByPersonalId", + resultsZmr.getPersonResult().size(), resultsErnp.getPersonResult().size()); + return RegisterStatusResults.fromZmrAndErnp(resultsZmr, resultsErnp); } catch (final EidasSAuthenticationException e) { @@ -113,6 +118,9 @@ public class RegisterSearchService { ernpClient.searchWithMds(eidasData.getGivenName(), eidasData.getFamilyName(), eidasData.getDateOfBirth(), eidasData.getCitizenCountryCode()); + log.debug(LOG_MSG_RESULTS, "seachByMDS", + resultsZmr.getPersonResult().size(), resultsErnp.getPersonResult().size()); + return RegisterStatusResults.fromZmrAndErnp(resultsZmr, resultsErnp); } catch (final EidasSAuthenticationException e) { @@ -149,6 +157,9 @@ public class RegisterSearchService { ErnpRegisterResult resultErnp = ernpClient.searchCountrySpecific( ccSpecificSearchReq, eidasData.getCitizenCountryCode()); + log.debug(LOG_MSG_RESULTS, "seachByCountrySpecifics", + resultsZmr.getPersonResult().size(), resultErnp.getPersonResult().size()); + return RegisterStatusResults.fromZmrAndErnp(resultsZmr, resultErnp); } else { @@ -183,6 +194,9 @@ public class RegisterSearchService { * because we only search for people with Austrian residence and they are in ZMR only */ + log.debug(LOG_MSG_RESULTS, "seachByResidence", + resultsZmr.getPersonResult().size(), 0); + return RegisterStatusResults.fromZmr(resultsZmr); } catch (final EidasSAuthenticationException e) { -- cgit v1.2.3