diff options
-rw-r--r-- | modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java | 16 |
1 files changed, 15 insertions, 1 deletions
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<CountrySpecificDetailSearchProcessor> 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) { |