From b454a8760bc2692d3d9c4fa3d0477c620895a95b Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Wed, 5 Mar 2014 07:44:28 +0100 Subject: check whether attributes obtained from different sources match --- .../gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java index b2f5076b6..aad80512a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java @@ -257,6 +257,13 @@ public class AttributeCollector implements IAction { for (PersonalAttribute current : source) { // check if we need to update the current pa if (target.containsKey(current.getName())) { + PersonalAttribute existing = target.get(current.getName()); + if(!(existing.isEmptyValue() && existing.isEmptyComplexValue())) + if(!(existing.getValue().equals(current.getValue()) || existing.getComplexValue().equals(current.getComplexValue()))) { + Logger.error("Attribute Value does not match the value from first authentication!"); + throw new MOAIDException("stork.14", null); + } + target.get(current.getName()).setStatus(current.getStatus()); target.get(current.getName()).setValue(current.getValue()); target.get(current.getName()).setComplexValue(current.getComplexValue()); -- cgit v1.2.3 From dbbf8045afe2ddf9a1ba4a4f511d85ffcba32cf8 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Wed, 5 Mar 2014 08:00:01 +0100 Subject: fixed bug in loop prevention --- .../at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java | 1 + 1 file changed, 1 insertion(+) diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java index aad80512a..7aab42426 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java @@ -119,6 +119,7 @@ public class AttributeCollector implements IAction { */ IPersonalAttributeList aquiredAttributes = new PersonalAttributeList(); currentAttribute.setStatus("notAvailable"); + aquiredAttributes.add((PersonalAttribute) currentAttribute.clone()); addOrUpdateAll(container.getResponse().getPersonalAttributeList(), aquiredAttributes); // - check if we can find a suitable AttributeProvider Plugin -- cgit v1.2.3 From f57dbf19485e1da5f9a60d65b0c4cc8ce6e4cd9c Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Wed, 5 Mar 2014 08:35:19 +0100 Subject: config gui fixes --- id/ConfigWebTool/src/main/webapp/js/common.js | 15 +++++++++------ id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/id/ConfigWebTool/src/main/webapp/js/common.js b/id/ConfigWebTool/src/main/webapp/js/common.js index 5fbbdafd1..fef368b0a 100644 --- a/id/ConfigWebTool/src/main/webapp/js/common.js +++ b/id/ConfigWebTool/src/main/webapp/js/common.js @@ -45,21 +45,21 @@ function oaSSOService() { } } function oaStork() { - if ($('#OAuseSTORKLogon').attr('checked') == 'checked') { + if ($('#OAuseSTORKLogon').is(':checked')) { $('#stork_block').css('display', "block"); } else { $('#stork_block').css('display', "none"); } } function oaVIDP() { - if ($('#oa_vidp_area').css('display') == "block") { - $('#oa_vidp_area').css('display', "none"); - $('#button_vidp_show').css('display', "block"); - $('#button_vidp_hidden').css('display', "none"); - } else { + if ($('#oa_vidp_area').css('display') == "none" || $('#OAuseVidp').is(':checked')) { $('#oa_vidp_area').css('display', "block"); $('#button_vidp_show').css('display', "none"); $('#button_vidp_hidden').css('display', "block"); + } else { + $('#oa_vidp_area').css('display', "none"); + $('#button_vidp_show').css('display', "block"); + $('#button_vidp_hidden').css('display', "none"); } } function oaSAML1() { @@ -201,9 +201,12 @@ function oaOnLoad() { oaBusinessService(); oaSSOService(); oaLegacyService(); + oaStork(); AdminTarget(); oaTargetSubSector(); + oaVIDP(); + $(".colorfield").each( function() { $(this).ColorPicker({ diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp index 1f42bf092..76c347445 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp @@ -505,7 +505,7 @@ -