Need Javascript Assistance With Nashhorn
Ullfig, Roberto Alfredo
rullfig at uic.edu
Mon Dec 1 13:18:26 EST 2014
Hello, one of our scripts in attribute-resolver.xml stopped working due to the switch to Nashhorn engine in Java 8. There are docs I've read here:
https://wiki.shibboleth.net/confluence/display/SHIB2/IdPJava1.8
I've recoded it but the problem now is that the eduPersonAffiliation attribute keeps getting appended to with each successive access. So the first time the attribute is for example member;staff - the second time it's member;staff;member;staff etc... Here is the code, any ideas?
<resolver:DataConnector xmlns="urn:mace:shibboleth:2.0:resolver:dc" xsi:type="dc:Static" id="eduPersonAffiliationCreate">
<Attribute id="eduPersonAffiliation">
<Value>dummy</Value>
</Attribute>
</resolver:DataConnector>
<resolver:AttributeDefinition xmlns="urn:mace:shibboleth:2.0:resolver:ad" xsi:type="ad:Script" id="eduPersonAffiliation" >
<resolver:Dependency ref="MySQL" />
<resolver:Dependency ref="eduPersonAffiliationCreate" />
<resolver:AttributeEncoder xsi:type="SAML1String" xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="urn:mace:dir:attribute-def:eduPersonAffiliation" />
<resolver:AttributeEncoder xsi:type="SAML2String" xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1" friendlyName="eduPersonAffiliation" />
<Script><![CDATA[
eduPersonAffiliation.getValues().clear();
for each ( affil in eduPersonAffiliationConcat.getValues().get(0).split(';') ) {
eduPersonAffiliation.getValues().add(affil);
}
]]></Script>
</resolver:AttributeDefinition>
---
Roberto Ullfig - rullfig at uic.edu
ACCC Research Programmer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20141201/5d8cbd3f/attachment.html
More information about the users
mailing list