diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-07-10 13:45:12 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2014-07-10 13:45:12 +0200 |
commit | 7212f4902eb4c2b3cf8026075ee04dd4506965ce (patch) | |
tree | 56dd3a9f33f9b1669f2489509e382883b82b91fa /id/server/idserverlib/src/main/java/at/gv | |
parent | 62b8a5dd94c29c8bd551dfb86c390e1dd992c7bc (diff) | |
download | moa-id-spss-7212f4902eb4c2b3cf8026075ee04dd4506965ce.tar.gz moa-id-spss-7212f4902eb4c2b3cf8026075ee04dd4506965ce.tar.bz2 moa-id-spss-7212f4902eb4c2b3cf8026075ee04dd4506965ce.zip |
update SAML1 attribute builder for STORK2 attributes
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/auth/builder/AuthenticationAssertionBuilder.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java index 35109dfea..89f42ab7d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java @@ -92,6 +92,15 @@ public class AuthenticationAssertionBuilder { String namespace = extendedSAMLAttribute.getNameSpace(); if (value instanceof String) { sb.append(MessageFormat.format( SAML_ATTRIBUTE, new Object[] {name, namespace, value})); + + } else if (value instanceof List<?>) { + if (!((List<?>)value).isEmpty()) { + Object firstEl = ((List<?>)value).get(0); + if (firstEl instanceof String) { + sb.append(MessageFormat.format( SAML_ATTRIBUTE, new Object[] {name, namespace, ((String)firstEl)})); + } + } + } else if (value instanceof Element) { try { String serializedValue = DOMUtils.serializeNode((Element)(value)); |