<div dir="ltr">I have multiple attributes I need to extract almost every time using
scriptedAttributeDefinition's in the attribute resolver, so rather than
having several extremely similar scriptedAttributeDefinitions I want to
know if its possible/advisable to return multiple IdPAttributes from a
single ScriptedAttributeDefinition. Specifically for IDP3 and JDK 8.<br><br>I tried the config below but the value at the SP for "<a href="http://url.com/saml/test1" target="_blank">http://url.com/saml/test1</a>"
is test2 instead of test1 like I was hoping. So I guess it ignored the
sourceAttributeID attribute value, and just used the value of
test_get_vals.<br><br><resolver:AttributeDefinition xsi:type="ad:Simple" id="test1" sourceAttributeID="test1src"><br> <resolver:Dependency ref="test_get_vals" /><br> <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:test1" /><br> <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="<a href="http://url.com/saml/test1" target="_blank">http://url.com/saml/test1</a>" friendlyName="test1" /><br></resolver:AttributeDefinition><br><br><br> <resolver:AttributeDefinition xsi:type="Script" xmlns="urn:mace:shibboleth:2.0:resolver:ad"<br> id="test_get_vals"><br><br> <Script><![CDATA[<br> load("nashorn:mozilla_compat.js");<br><br> importPackage(Packages.net.shibboleth.idp.attribute);<br> logger = Java.type("org.slf4j.LoggerFactory").getLogger("net.shibboleth.idp.attribute");<br> IdPAttributeType = Java.type("net.shibboleth.idp.attribute.IdPAttribute");<br><br> test1src = new IdPAttributeType("test1src");<br><br> jsArray = [new StringAttributeValue("test1")];<br><br> var tmp = Java.to(jsArray, Java.type('java.util.List'))<br> test1src.setValues(tmp);<br> test_get_vals.getValues().add("test2");<br><br> ]]></Script><br><br> </resolver:AttributeDefinition><br><br><br>Thanks,<br>Christopher</div>