aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-03-05 07:44:28 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-03-05 10:26:50 +0100
commitb454a8760bc2692d3d9c4fa3d0477c620895a95b (patch)
tree831b2287d383b13e131ebdc37f3fd7aa9744945a /id/server/idserverlib/src/main/java/at/gv
parentd22d1372540058c1e20a49c5df23f9ba6f880089 (diff)
downloadmoa-id-spss-b454a8760bc2692d3d9c4fa3d0477c620895a95b.tar.gz
moa-id-spss-b454a8760bc2692d3d9c4fa3d0477c620895a95b.tar.bz2
moa-id-spss-b454a8760bc2692d3d9c4fa3d0477c620895a95b.zip
check whether attributes obtained from different sources match
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java7
1 files changed, 7 insertions, 0 deletions
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());