Attribute IDs containing Dashes & Resolver Script
Patrick Rynhart
P.Rynhart at massey.ac.nz
Mon Sep 9 00:02:32 EDT 2013
I'm attempting to federate with an SP where they are expecting an
attribute to be called "unscoped-affiliation" (an id containing dashes).
I will be able to provide the data they want provided I can use a Script.
As per this example:
https://wiki.shibboleth.net/confluence/display/SHIB2/ResolverScriptAttributeDefinition
I am attempting to construct my resolver (in attribute-resolver.xml) as
follows:
<resolver:AttributeDefinition xsi:type="Script"
xmlns="urn:mace:shibboleth:2.0:resolver:ad" id="unscoped-affliation">
<Script><![CDATA[
importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
unscoped-affliation = new BasicAttribute("unscoped-affliation");
unscoped-affliation.getValues().add("foo");
]]></Script>
</resolver:AttributeDefinition>
The problem is the line:
unscoped-affliation = new BasicAttribute("unscoped-affliation");
which results in the following ECMAScript error:
sun.org.mozilla.javascript.EvaluatorException: Invalid assignment
left-hand side. (<Unknown source>#2) in <Unknown source> at line number 2
If I remove the dashes (and call my variable unscopedaffiliation) then
things work, but obviously the SP is expecting unscoped-affiliation.
I have tried using single and double quotes, e.g.
'unscoped-affliation' = new BasicAttribute("unscoped-affliation");
but I get the same problem.
How can I resolve this please ?
Thanks,
Patrick
More information about the users
mailing list