CampusID substring
Goggins, Patrick
gogginsp at uwgb.edu
Mon Jul 21 14:53:44 EDT 2014
For one of our third-party vendors, they are looking for a partial of what we are currently populating in AD for the employeeNumber field. Basically I’m looking at pulling in a substring of the last nine integers in the field. Below is the script I’ve put together but it looks like my syntaxing needs some work.
<resolver:AttributeDefinition xsi:type="Script" xmlns="urn:mace:shibboleth:2.0:resolver:ad" id="CampusID" sourceAttributeID="employeeNumber">
<resolver:Dependency ref="myLDAP" />
<resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:2.16.840.1.113730.3.1.3" friendlyName="CampusID" />
<Script><![CDATA[
importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
importPackage(Packages.org.slf4j);
CampusID = new BasicAttribute("CampusID");
CampusID.getValues().add(requestContext.getPrincipalName());
CampusID = CampusID.SubString(6,9);
]]>
</Script>
</resolver:AttributeDefinition>
Any idea what I’m missing?
Thanks,
~Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20140721/a57b1841/attachment.html
More information about the users
mailing list