<div dir="ltr"><div><div><div>We are working jointly -- it's a typo sent earlier - darn.<br><br></div>Sorry for wasting your time.<br><br></div>The actual script is as below.<br><br>Copying Joel's description: The '<a href="http://logger.info" target="_blank">logger.info</a>'
is showing the correct value calculated for fooBarEntitlement -- however the value
calculated is not sent to the SP --- the release steps -- all seems good.<br><br></div>Any ideas? We are juggling many balls in the air with the migration -- under short time -- so we may be missing something very obvious.<br><div><div><div><br><br><resolver:AttributeDefinition id="fooBarEntitlement" xsi:type="Script" xmlns="urn:mace:shibboleth:2.<wbr>0:resolver:ad" sourceAttributeID="InComing_<wbr>Attribute"><br> <resolver:Dependency ref="InComing_Source_<wbr>DataSource" /><br> <resolver:AttributeEncoder xsi:type="SAML2String" xmlns="urn:mace:shibboleth:2.<wbr>0:attribute:encoder"<br> <wbr> name="urn:mace:dir:attribute-<wbr>def:fooBarEntitlement" <br> <wbr> friendlyName="<wbr>fooBarEntitlement" /><br> <wbr> <br> <wbr> <br> <Script><br> <![CDATA[<br> <wbr> load("nashorn:mozilla_compat.<wbr>js");<br> <wbr> importPackage(Packages.edu.<wbr>internet2.middleware.<wbr>shibboleth.common.attribute.<wbr>provider);<br> <wbr> importPackage(Packages.org.<wbr>slf4j);<br> <wbr> <br> <wbr> logger = LoggerFactory.getLogger("edu.<wbr>internet2.middleware.<wbr>shibboleth.resolver.Script.<wbr>fooBarEntitlement");<br> <wbr> <br> <wbr> fooBarEntitlement = new BasicAttribute("fooBarEntitlement");<br> <wbr> <br> <wbr> <br> <wbr> if (InComing_Attribute.getValues(<wbr>) == 'BLAH')<br> <wbr> {<br> <wbr> fooBarEntitlement.<wbr>getValues().add("Blue Sky);<br> <wbr> }<br> <wbr> else<br> <wbr> {<br> <wbr> fooBarEntitlement.<wbr>getValues().add("Cloudy Sky);<br> <wbr> }<br> <wbr> <a href="http://logger.info" target="_blank">logger.info</a>("Values of fooBarEntitlement are: " + fooBarEntitlement.<wbr>getValues());<br> <wbr> <br> ]]><br> </Script> <br> </resolver:<wbr>AttributeDefinition></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 6, 2017 at 8:27 AM, Cantor, Scott <span dir="ltr"><<a href="mailto:cantor.2@osu.edu" target="_blank">cantor.2@osu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 6/6/17, 11:20 AM, "users on behalf of Joel Levin" <<a href="mailto:users-bounces@shibboleth.net">users-bounces@shibboleth.net</a> on behalf of <a href="mailto:joel.aaron.levin@gmail.com">joel.aaron.levin@gmail.com</a>> wrote:<br>
<br>
> Could anyone help?<br>
<br>
Well, principally, the definition says you're creating fooBarEntitlement, but then your script creates an Attribute called scriptedValueEntitlement, so that's just not going to work.<br>
<br>
Secondarily, this isn't how V3 (or V2, under Nashorn) scripts work. You need to prevent creating a "new" copy of the attribute because V3 already creates the output attribute (see ScriptedAttributeDefinition, Java 1.8 and Nashorn).<br>
<br>
My advice is that you get your scripts working under V2 and Java 8/Nashorn first. Once that's done, they should work largely unmodified under V3. You're mixing changes here. There's no way that script could have worked under V2 that I can see because of the name mismatch.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Scott<br>
<br>
<br>
--<br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.<wbr>net</a><br>
</font></span></blockquote></div><br></div>