diff options
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SimpleEidasData.java')
-rw-r--r-- | eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SimpleEidasData.java | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SimpleEidasData.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SimpleEidasData.java index 35f353f4..5ad92507 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SimpleEidasData.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/dao/SimpleEidasData.java @@ -23,12 +23,10 @@ package at.asitplus.eidas.specific.modules.auth.eidas.v2.dao; -import org.apache.commons.lang3.builder.EqualsBuilder; - -import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.WorkflowException; import at.gv.e_government.reference.namespace.persondata._20020228.PostalAddressType; import lombok.Builder; import lombok.Data; +import org.apache.commons.lang3.builder.EqualsBuilder; @Data @Builder @@ -60,27 +58,18 @@ public class SimpleEidasData { private final String taxNumber; /** - * Compares the register result with the eidas data. + * Compares the register result with the EIDAS data (given name, family name, date of birth, personal identifier). * * @param result The register data to use for comparison - * @return true or false depending of the data matches - * @throws WorkflowException if multiple results have been found + * @return whether the data (given name, family name, date of birth, personal identifier) match */ - public boolean equalsRegisterData(RegisterResult result) throws WorkflowException { - /*TODO: maybe this is check is not valid, because only the minimum data-set (personalIdentifer, givenName, - * familyName, dateOfBirth) has to be always available. Any other attributes are optional. - * This check will always evaluate to false if register has more information as current eIDAS process!!! - */ - + public boolean equalsRegisterData(RegisterResult result) { return new EqualsBuilder() .append(result.getGivenName(), givenName) .append(result.getFamilyName(), familyName) .append(result.getDateOfBirth(), dateOfBirth) - .append(result.getPlaceOfBirth(), placeOfBirth) - .append(result.getBirthName(), birthName) - .append(result.getTaxNumber(), taxNumber) - .isEquals() && result.getPseudonym().stream() - .anyMatch(el -> el.equals(pseudonym)); + .isEquals() + && result.getPseudonym().stream().anyMatch(el -> el.equals(pseudonym)); } /** |