aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2015-05-05 12:58:29 +0200
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2015-05-05 12:58:29 +0200
commitae570bf65585de05db08dd50d87352fc2027c624 (patch)
tree69899f784c5727c1630f3ef42d3f896302360e79 /id/server/idserverlib/src
parent2db59d0b99e6ca3bc9139b72fedfd9356be7e898 (diff)
downloadmoa-id-spss-ae570bf65585de05db08dd50d87352fc2027c624.tar.gz
moa-id-spss-ae570bf65585de05db08dd50d87352fc2027c624.tar.bz2
moa-id-spss-ae570bf65585de05db08dd50d87352fc2027c624.zip
fixed attribute forwarding when using STORK2 SAML for SP
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java
index 3ab4ec4a1..d3a5a1085 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java
@@ -99,6 +99,16 @@ public class MOAAttributeProvider {
Logger.error("Could not found MOA extraction method while getting attribute: " + storkAttribute);
e.printStackTrace();
}
+ } else if (authData.getStorkAttributes().containsKey(requestedAttribute.getName())) {
+ Logger.debug("Trying to get value for attribute directly from STORK2 response [" + storkAttribute + "]");
+ try {
+ PersonalAttribute tmp = authData.getStorkAttributes().get(requestedAttribute.getName());
+ attributeList.add((PersonalAttribute) tmp.clone());
+ } catch(Exception e) {
+ Logger.error("Could not retrieve attribute from STORK2 response: " + storkAttribute);
+ if(Logger.isDebugEnabled())
+ e.printStackTrace();
+ }
} else {
Logger.debug("MOA method for extraction of attribute " + storkAttribute + " not defined.");
}