<div dir="ltr">Scott as we discussed earlier today. Something like the code below
would have been very useful getting attributes values out of a custom
subject class it would have cut down on custom javascript considerably.<br><br><div>1)
Required: PrincipalClass: What principal class to extract out of the
subject. If there are multiple matches this logic will be called
multiple times once per instance. Assumes Principal also has an
interface which allows get(String), and Set<String> getKeys().<br>2)
Optional: resultPrefix would return the attributes with the specified
prefix appended to the attribute name- it doesn’t make sense if
ReturnAttributes is also set.<br>3) Optional: Attribute list - list of attributes to return or return all if not listed<br>4) Optional: ReturnAttributes change the name of the attributes on return to those specified.<br> <br><resolver:DataConnector xsi:type="dc:Subject" xmlns="urn:mace:shibboleth:2.0:resolver:dc"<br> id="subject_extract"<br> principalClass="customPrincipalClass"<br> resultPrefix=""<br> attributes = "uid cn sn"><br> <ReturnAttributes>ATTRIBUTE_1 ATTRIBUTE_2 ATTRIBUTE_3</ReturnAttributes><br></resolver:DataConnector><br><br></div>The
other issue less problematic issue in extracting a large number of
dynamic attributes is having to give explicit AttributeDefinitions and
AttributeEncoders to each of them even if I could easily have derived the values from the
attribute name. So it would be nice if I could programmatically create
AttributeDefinitions for an attribute in javascript, and/or some how
apply a AttributeDefinition to multiple attributes at the same time
somewhere in the attribute_resolver configfile.<br><br> <resolver:AttributeDefinition id="persistentId" xsi:type="Simple" <span>xmlns="urn:mace:shibboleth:2.0:resolver:ad" id="custom1 custom2 custom3"></span><br><span></span><p class="MsoNormal"> <span></span><resolver:AttributeEncoder
xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:$INPUT"
/></p>
<p class="MsoNormal"><span> </span><span> </span><span> </span><span> </span><resolver:AttributeEncoder
xsi:type="enc:SAML2String" name="<a href="https://mycustomnamespace/attributes/$INPUT" target="_blank">https://mycustomnamespace/attributes/$INPUT</a>"
friendlyName="$INPUT" /></p>
<span> </resolver:AttributeDefinition></span></div>