diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-02-14 13:47:43 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-02-14 13:47:43 +0100 |
commit | 650cbb315304e47e0b920c3bc81579cc4efa5514 (patch) | |
tree | 78d3edb6dcd08934f80f2ecfa736c5356f809f9b /id/ConfigWebTool/src/main/java | |
parent | 4cc2fc3e44ff1e643c4a16a132ae90e60c84cf37 (diff) | |
download | moa-id-spss-650cbb315304e47e0b920c3bc81579cc4efa5514.tar.gz moa-id-spss-650cbb315304e47e0b920c3bc81579cc4efa5514.tar.bz2 moa-id-spss-650cbb315304e47e0b920c3bc81579cc4efa5514.zip |
allow to load SL-Templates from local file-system
Diffstat (limited to 'id/ConfigWebTool/src/main/java')
4 files changed, 14 insertions, 11 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java index b0de196ca..fd4030937 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java @@ -934,17 +934,20 @@ public class EditOAAction extends ActionSupport implements ServletRequestAware, TemplateType el = new TemplateType(); el.setURL(generalOA.getSLTemplateURL1()); template.add(el); - } + } else + template.add(new TemplateType()); if (MiscUtil.isNotEmpty(generalOA.getSLTemplateURL2())) { TemplateType el = new TemplateType(); el.setURL(generalOA.getSLTemplateURL2()); template.add(el); - } + }else + template.add(new TemplateType()); if (MiscUtil.isNotEmpty(generalOA.getSLTemplateURL3())) { TemplateType el = new TemplateType(); el.setURL(generalOA.getSLTemplateURL3()); template.add(el); - } + }else + template.add(new TemplateType()); } else { if (template != null && template.size() > 0) template.clear(); diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java index 46d9f4db8..b0e4804a8 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java @@ -172,14 +172,14 @@ public class ValidationHelper { log.debug("Validate URL " + urlString); - if (urlString.startsWith("http") || urlString.startsWith("https")) { + //if (urlString.startsWith("http") || urlString.startsWith("https")) { try { new URL(urlString); return true; } catch (MalformedURLException e) { } - } + //} return false; } diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java index d7d97e5d4..1c7da7079 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java @@ -247,7 +247,7 @@ public class MOAConfigValidator { log.info("Empty SLRequestTemplate Handy-BKU"); errors.add(LanguageHelper.getErrorString("validation.general.slrequest.handy.empty")); } else { - if (!ValidationHelper.validateURL(check)) { + if (ValidationHelper.isNotValidIdentityLinkSigner(check)) { log.info("SLRequestTemplate Handy-BKU is not valid"); errors.add(LanguageHelper.getErrorString("validation.general.slrequest.handy.valid")); } @@ -258,7 +258,7 @@ public class MOAConfigValidator { log.info("Empty SLRequestTemplate local BKU"); errors.add(LanguageHelper.getErrorString("validation.general.slrequest.local.empty")); } else { - if (!ValidationHelper.validateURL(check)) { + if (ValidationHelper.isNotValidIdentityLinkSigner(check)) { log.info("SLRequestTemplate local BKU is not valid"); errors.add(LanguageHelper.getErrorString("validation.general.slrequest.local.valid")); } @@ -269,7 +269,7 @@ public class MOAConfigValidator { log.info("Empty SLRequestTemplate Online-BKU"); errors.add(LanguageHelper.getErrorString("validation.general.slrequest.online.empty")); } else { - if (!ValidationHelper.validateURL(check)) { + if (ValidationHelper.isNotValidIdentityLinkSigner(check)) { log.info("SLRequestTemplate Online-BKU is not valid"); errors.add(LanguageHelper.getErrorString("validation.general.slrequest.online.valid")); } diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAGeneralConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAGeneralConfigValidation.java index c84c44de4..d3a2241d3 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAGeneralConfigValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAGeneralConfigValidation.java @@ -133,19 +133,19 @@ public class OAGeneralConfigValidation { } else { check = form.getSLTemplateURL1(); if (MiscUtil.isNotEmpty(check) && - !ValidationHelper.validateURL(check) ) { + ValidationHelper.isNotValidIdentityLinkSigner(check) ) { log.info("First OA-specific SecurityLayer Templates is not valid"); errors.add(LanguageHelper.getErrorString("validation.general.sltemplate1.valid")); } check = form.getSLTemplateURL2(); if (MiscUtil.isNotEmpty(check) && - !ValidationHelper.validateURL(check) ) { + ValidationHelper.isNotValidIdentityLinkSigner(check) ) { log.info("Second OA-specific SecurityLayer Templates is not valid"); errors.add(LanguageHelper.getErrorString("validation.general.sltemplate2.valid")); } check = form.getSLTemplateURL3(); if (MiscUtil.isNotEmpty(check) && - !ValidationHelper.validateURL(check) ) { + ValidationHelper.isNotValidIdentityLinkSigner(check) ) { log.info("Third OA-specific SecurityLayer Templates is not valid"); errors.add(LanguageHelper.getErrorString("validation.general.sltemplate3.valid")); } |