From 7212f4902eb4c2b3cf8026075ee04dd4506965ce Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 10 Jul 2014 13:45:12 +0200 Subject: update SAML1 attribute builder for STORK2 attributes --- .../moa/id/auth/builder/AuthenticationAssertionBuilder.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'id') 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)); -- cgit v1.2.3