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(+) (limited to 'id/server/idserverlib/src/main/java/at/gv') 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