Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
    <!-- Swedish eID Framework, personalIdentityNumber.  This attribute SHALL only contain Swedish person numbers -->
    <AttributeDefinition xsi:type="ScriptedAttribute" id="personalIdentityNumber">
        <InputDataConnector ref="myLDAP"<InputAttributeDefinition attributeNames="norEduPersonNIN" />
        <Script>
         <![CDATA[
                // Script to take a person number and filter out interim numbers (containing letters)
                nin=norEduPersonNIN.getValues().get(0)
                if (nin.matches("^[0-9]*$")) {
                        personalIdentityNumber.getValues().add(nin)
                }
         ]]>
        </Script>
        <AttributeEncoder xsi:type="SAML1String" name="urn:mace:dir:attribute-def:personalIdentityNumber" encodeType="false" />
        <AttributeEncoder xsi:type="SAML2String" name="urn:oid:1.2.752.29.4.13" friendlyName="personalIdentityNumber" encodeType="false" />
    </AttributeDefinition>

Om ditt norEduPersonNIN är själv en ScriptedAttribute finns i LDAP måste du byta ut InputAttributeDefinition till InputDataConnector till InputAttributeDefinition.

schacDateOfBirth


Förutsättningar:

...