Versions Compared

Key

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

...

Kodblock
languagexml
    <!-- Swedish eID Framework, personalIdentityNumber. Release norEduPersonNIN if it only contains numbers (filter out interim numbers) -->
    <!-- Uncomment InputAttributeDefinition if norEduPersonNIN is generated by a script or InputDataConnector if it is an attribute in LDAP -->
    <AttributeDefinition xsi:type="RegexSplit" id="personalIdentityNumber" regex="^((18|19|20)?[0-9]{2}((0[0-9])|(10|11|12))((([0-2][0-9])|(3[0-1]))|((6[1-9])|([7-8][0-9])|(9[0-1])))[0-9]{4})$">
        <!-- <InputAttributeDefinition ref="norEduPersonNIN"/> -->
        <!-- <InputDataConnector ref="myLDAP" attributeNames="norEduPersonNIN" /> -->
        <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>


Skapa attributet schacDateOfBirth baserat på

...

norEduPersonNIN

Förutsättningar:

  • Ett svenskt personnummer finns i norEduPersonNIN (se ovan). 
Kodblock
languagexml
    <!-- Schema: SCHema for ACademia (SCHAC) -->
    <!-- This takes the norEduPersonNIN and returns the date of birth part. -->
    <!-- Uncomment InputAttributeDefinition if norEduPersonNIN is generated by a script or InputDataConnector if it is an attribute in LDAP -->
    <AttributeDefinition xsi:type="RegexSplit" id="schacDateOfBirth" regex="^((18|19|20)?[0-9]{2}((0[0-9])|(10|11|12))((([0-2][0-9])|(3[0-1]))|((6[1-9])|([7-8][0-9])|(9[0-1])))).*$">
        <!-- <InputAttributeDefinition ref="norEduPersonNIN"/> -->
        <!-- <InputDataConnector ref="myLDAP" attributeNames="norEduPersonNIN" /> -->
        <AttributeEncoder xsi:type="SAML1String" name="urn:mace:dir:attribute-def:schacDateOfBirth" encodeType="false" />
        <AttributeEncoder xsi:type="SAML2String" name="urn:oid:1.3.6.1.4.1.25178.1.2.3" friendlyName="schacDateOfBirth" encodeType="false" />
    </AttributeDefinition>