not able to find ScriptedAttribute block

Pablo Vidaurri psvidaurri at gmail.com
Thu Apr 9 18:51:19 EDT 2020


I already have something like this working, but now need to use a 2nd
Attribute definition to execute a CDATA script for a custom attribute. On
startup I get the following:

Plugin 'foo' has a Data Connector dependency on plugin 'bar' which doesn't
exist

I don't get it because there are no issues with the first script I already
have. In fact I tried to copy/paste what I already have using different id
but still no luck. This is my 2nd CDATA script in attribute-resolution.xml:

<AttributeDefinition id="foo" xsi:type="Simple">
        <InputDataConnector ref="bar" attributeNames="foo"/>
        <AttributeEncoder xsi:type="SAML1String"
name="urn:mace:dir:attribute-def:foo" />
        <AttributeEncoder xsi:type="SAML2String" name="username"
friendlyName="foo" />
    </AttributeDefinition>

 <AttributeDefinition id="bar" xsi:type="ScriptedAttribute"
dependencyOnly="true">
         <InputDataConnector ref="myLDAP" attributeNames="uid cn"/>
         <Script><![CDATA[
                bar.getValues().clear();
                if(typeof uid != "undefined" && uid !=null)
                {
                    bar.addValue(uid.getValues().get(0));
                }
                else
                {
                    bar.addValue(cn.getValues().get(0));
                }
        ]]></Script>
        </AttributeDefinition>

my first script is exactly the same except using far/car instead of foo/bar
and it works fine.

-psv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20200409/408d794c/attachment.html>


More information about the users mailing list