diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2017-02-10 13:04:47 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2017-02-10 13:04:47 +0100 |
commit | 226db2c5c41c149256459bf18dff4585a07e5ea1 (patch) | |
tree | 5dae6843a16a5aab872bde0cc6d20fda32c9d5bd /id/ConfigWebTool/src/main/java | |
parent | b4e3813e3f0fc900b5c2194bc6c06e4908a14797 (diff) | |
parent | cb57226d20f61b33e485144f2814edcd36589d5e (diff) | |
download | moa-id-spss-226db2c5c41c149256459bf18dff4585a07e5ea1.tar.gz moa-id-spss-226db2c5c41c149256459bf18dff4585a07e5ea1.tar.bz2 moa-id-spss-226db2c5c41c149256459bf18dff4585a07e5ea1.zip |
Merge branch 'eIDAS_node_implementation' into development_preview
Diffstat (limited to 'id/ConfigWebTool/src/main/java')
2 files changed, 13 insertions, 1 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java index ed2c2f903..8e8020d75 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/StorkConfigValidator.java @@ -43,7 +43,7 @@ public class StorkConfigValidator { errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.cc", new Object[] {ValidationHelper.getPotentialCSSCharacter(false)}, request )); } - if(!check.toLowerCase().matches("^[a-z][a-z]$")) { + if(!check.toLowerCase().matches("(^[a-z][a-z]$)|(^[a-z][a-z]-[a-z]*)")) { log.warn("CPEPS config countrycode does not comply to ISO 3166-2 : " + check); errors.add(LanguageHelper.getErrorString("validation.stork.cpeps.cc", new Object[] {check}, request )); diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java index 650553ab3..0062beb96 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OATargetConfigValidation.java @@ -24,6 +24,8 @@ package at.gv.egovernment.moa.id.configuration.validation.oa; import java.util.ArrayList; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; @@ -74,6 +76,16 @@ public class OATargetConfigValidation { log.info("Not valid CompanyNumber"); errors.add(LanguageHelper.getErrorString("validation.general.identificationnumber.fn.valid", request)); } + + } else if (form.getIdentificationType().equals(Constants.IDENIFICATIONTYPE_EIDAS)) { + Pattern pattern = Pattern.compile("[A-Z,a-z]{2}\\+[A-Z,a-z]{2}"); + Matcher matcher = pattern.matcher(check); + if (!matcher.matches()) { + log.info("Not valid eIDAS Target"); + errors.add(LanguageHelper.getErrorString("validation.general.identificationnumber.eidas.valid", request)); + + } + } } |