...
Lähde: TemplateAttributeDefinition
Shibboleth IdP versio 4:ssa moniarvoisen attribuutin yhdistely kahdesta muusta attribuutista (ja eri lähteistä), joiden arvoihin lisätään alku :
Code Block |
---|
<AttributeDefinition id="uniquecode" xsi:type="ScriptedAttribute">
<InputDataConnector ref="LDAP1" attributeNames="opiskelijanumero" />
<InputDataConnector ref="LDAP2" attributeNames="oppijanumero" />
<AttributeEncoder xsi:type="SAML2String" name="1.3.6.1.4.1.25178.1.2.14" friendlyName="schacPersonalUniqueCode" encodeType="false"/>
<Script><![CDATA[
if (typeof opiskelijanumero != "undefined") {
uniquecode.addValue("prefix1:" + opiskelijanumero.getValues().get(0));
}
if (typeof oppijanumero != "undefined") {
uniquecode.addValue("prefix2:" + oppijanumero.getValues().get(0));
}
]]></Script>
</AttributeDefinition>
|
Lähde: ScriptedAttributeDefinition