Repository: italia/spid-cie-oidc-django (language: python)

Issue:
fix: SPID attributes aligned to the specs v.1.3



Discussion / hints:

Fix patch:
diff --git a/docs/FEDERATION_METADATA_POLICY.md b/docs/FEDERATION_METADATA_POLICY.md
index 942cb7e0..76730440 100644
--- a/docs/FEDERATION_METADATA_POLICY.md
+++ b/docs/FEDERATION_METADATA_POLICY.md
@@ -80,23 +80,23 @@ md = {
      "https://www.spid.gov.it/SpidL3"
    ],
   "claims_supported": [
-      "https://attributes.spid.gov.it/spidCode",
-      "https://attributes.spid.gov.it/name",
-      "https://attributes.spid.gov.it/familyName",
-      "https://attributes.spid.gov.it/placeOfBirth",
-      "https://attributes.spid.gov.it/countyOfBirth",
-      "https://attributes.spid.gov.it/dateOfBirth",
-      "https://attributes.spid.gov.it/gender",
-      "https://attributes.spid.gov.it/companyName",
-      "https://attributes.spid.gov.it/registeredOffice",
-      "https://attributes.spid.gov.it/fiscalNumber",
-      "https://attributes.spid.gov.it/ivaCode",
-      "https://attributes.spid.gov.it/idCard",
-      "https://attributes.spid.gov.it/mobilePhone",
-      "https://attributes.spid.gov.it/email",
-      "https://attributes.spid.gov.it/address",
-      "https://attributes.spid.gov.it/expirationDate",
-      "https://attributes.spid.gov.it/digitalAddress"
+        "https://attributes.eid.gov.it/spid_code",
+        "given_name",
+        "family_name",
+        "place_of_birth",
+        "birthdate",
+        "gender",
+        "https://attributes.eid.gov.it/company_name",
+        "https://attributes.eid.gov.it/registered_office",
+        "https://attributes.eid.gov.it/fiscal_number",
+        "https://attributes.eid.gov.it/company_fiscal_number",
+        "https://attributes.eid.gov.it/vat_number",
+        "document_details",
+        "phone_number",
+        "email",
+        "https://attributes.eid.gov.it/e_delivery_service",
+        "https://attributes.eid.gov.it/eid_exp_date",
+        "address"
    ],
   "grant_types_supported": [
     "authorization_code",
diff --git a/docs/technical_specifications/RELYING_PARTY.md b/docs/technical_specifications/RELYING_PARTY.md
index 2696c642..6b442ed5 100644
--- a/docs/technical_specifications/RELYING_PARTY.md
+++ b/docs/technical_specifications/RELYING_PARTY.md
@@ -101,14 +101,14 @@ SPID_REQUESTED_CLAIMS = getattr(
     "RP_REQUIRED_CLAIMS",
     {
         "id_token": {
-            "https://attributes.spid.gov.it/familyName": {"essential": True},
-            "https://attributes.spid.gov.it/email": {"essential": True},
+            "https://attributes.eid.gov.it/family_name": {"essential": True},
+            "https://attributes.eid.gov.it/email": {"essential": True},
         },
         "userinfo": {
-            "https://attributes.spid.gov.it/name": None,
-            "https://attributes.spid.gov.it/familyName": None,
-            "https://attributes.spid.gov.it/email": None,
-            "https://attributes.spid.gov.it/fiscalNumber": None,
+            "https://attributes.eid.gov.it/given_name": None,
+            "https://attributes.eid.gov.it/family_name": None,
+            "https://attributes.eid.gov.it/email": None,
+            "https://attributes.eid.gov.it/fiscal_number": None,
         },
     },
 )
diff --git a/examples/federation_authority/dumps/example.json b/examples/federation_authority/dumps/example.json
index 7085eae9..803d0f0f 100644
--- a/examples/federation_authority/dumps/example.json
+++ b/examples/federation_authority/dumps/example.json
@@ -15,15 +15,43 @@
     "email": "",
     "origin": null,
     "attributes": {
-      "https://attributes.spid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78",
-      "given_name": "peppe",
-      "family_name": "maradona",
-      "email": "that@ema.il",
-      "fiscal_number": "8sada89s7da89sd7a98sd78",
-      "sub": "da750f319fa08358b1342d9de6156f590c8f97c6b5d33a9dfd71657e121ecc58",
-      "username": "http://127.0.0.1:8002/oidc/op/__da750f319fa08358b1342d9de6156f590c8f97c6b5d33a9dfd71657e121ecc58",
-      "first_name": "antonio",
-      "last_name": "rossi"
+      "https://attributes.eid.gov.it/spid_code":"ABCD123456789A",
+      "given_name":"peppe",
+      "family_name":"maradona",
+      "place_of_birth":{
+        "region":"NA",
+        "locality":"F839"
+      },
+      "birthdate":"1980-10-10",
+      "gender":"M",
+      "https://attributes.eid.gov.it/company_name":"Maradona Inc",
+      "https://attributes.eid.gov.it/registered_office":{
+        "formatted":"Via del miracolo 21 80100 Napoli"
+      },
+      "https://attributes.eid.gov.it/fiscal_number":"TINIT-ABCXYZ00W00Z000Z",
+      "https://attributes.eid.gov.it/company_fiscal_number":"TINIT-ABCXYZ00W00Z000Z",
+      "https://attributes.eid.gov.it/vat_number":"VATIT-12345678901",
+      "document_details":{
+        "type":"cartaIdentita",
+        "document_number":"AS09452389",
+        "issuer":{
+        "name":"ComuneNapoli"},
+        "date_of_issuance":"2016-01-02",
+        "date_of_expiry":"2026-01-31"
+      },
+      "phone_number":"39041322222",
+      "email":"that@ema.il",
+      "https://attributes.eid.gov.it/e_delivery_service":"peppe@pec.it",
+      "https://attributes.eid.gov.it/eid_exp_date":"2050-01-01",
+      "address": {
+        "street_address":"503,Washington Avenue",
+        "postal_code":"12401",
+        "locality":"Kingston",
+        "region":"New york",
+        "country_code":"US"
+      },
+      "sub": "76f6777878cc718fad7a6c4337268b33276a8492ef8e036d8cb0f421780d4ede",
+      "username": "http://127.0.0.1:8002/oidc/op__76f6777878cc718fad7a6c4337268b33276a8492ef8e036d8cb0f421780d4ede"
     },
     "groups": [],
     "user_permissions": []
@@ -45,12 +73,46 @@
     "email": "",
     "origin": null,
     "attributes": {
-      "https://attributes.spid.gov.it/fiscal_number": "AATTTJDFKSKDF89",
-      "given_name": "antonio",
-      "family_name": "rossi",
-      "email": "that@ema.il",
-      "fiscal_number": "8sada89s7da89sd7a98sd78"
-    },
+        "https://attributes.eid.gov.it/spid_code": "ABCD123456789A",
+        "given_name": "antonio",
+        "family_name": "rossi",
+        "place_of_birth": {
+          "region": "NA",
+          "locality": "F839"
+        },
+        "birthdate": "1980-10-10",
+        "gender": "male",
+        "https://attributes.eid.gov.it/company_name": "AgID",
+        "https://attributes.eid.gov.it/registered_office": {
+            "formatted":"via Listz 21 00144 Roma"
+        },
+        "https://attributes.eid.gov.it/fiscal_number": "TINIT-AATTTJDFKSKDF89",
+        "https://attributes.eid.gov.it/company_fiscal_number": "TINIT-ABCXYZ00W00Z000Z",
+        "https://attributes.eid.gov.it/vat_number": "VATIT-12345678901",
+        "document_details": {
+          "type": "cartaIdentita",
+          "document_number": "AS09452389",
+          "issuer": {
+            "name": "ComuneRoma"
+          },
+          "date_of_issuance": "2015-01-02",
+          "date_of_expiry": "2025-01-31"
+        },
+        "phone_number": "39041322222",
+        "email": "antonio@email.it",
+        "https://attributes.eid.gov.it/e_delivery_service": "antonio@pec.it",
+        "https://attributes.eid.gov.it/eid_exp_date": "2049-01-01",
+        "address": {
+          "street_address": "503,Washington Avenue",
+          "postal_code": "12401",
+          "locality": "Kingston",
+          "region": "New york",
+          "country_code": "US"
+        },
+        "sub": "da750f319fa08358b1342d9de6156f590c8f97c6b5d33a9dfd71657e121ecc58",
+        "username": "http://127.0.0.1:8000/oidc/op/__da750f319fa08358b1342d9de6156f590c8f97c6b5d33a9dfd71657e121ecc58"
+      },
+
     "groups": [],
     "user_permissions": []
   }
@@ -71,13 +133,12 @@
     "email": "antonio@email.it",
     "origin": null,
     "attributes": {
-      "sub": "da750f319fa08358b1342d9de6156f590c8f97c6b5d33a9dfd71657e121ecc58",
-      "username": "http://127.0.0.1:8000/oidc/op/__da750f319fa08358b1342d9de6156f590c8f97c6b5d33a9dfd71657e121ecc58",
-      "first_name": "antonio",
-      "last_name": "rossi",
-      "email": "antonio@email.it",
-      "fiscal_number": "AATTTJDFKSKDF89"
-    },
+          "https://attributes.eid.gov.it/fiscal_number": "AATTTJDFKSKDF89",
+          "given_name": "antonio",
+          "family_name": "rossi",
+          "email": "that@ema.il",
+          "fiscal_number": "8sada89s7da89sd7a98sd78"
+        },
     "groups": [],
     "user_permissions": []
   }
@@ -306,22 +367,23 @@
           "https://www.spid.gov.it/SpidL3"
         ],
         "claims_supported": [
-          "https://attributes.spid.gov.it/spidCode",
-          "given_name",
-          "family_name",
-          "place_of_birth",
-          "date_of_birth",
-          "gender",
-          "https://attributes.spid.gov.it/companyName",
-          "https://attributes.spid.gov.it/registeredOffice",
-          "https://attributes.spid.gov.it/fiscal_number",
-          "https://attributes.spid.gov.it/ivaCode",
-          "https://attributes.spid.gov.it/idCard",
-          "https://attributes.spid.gov.it/mobilePhone",
-          "email",
-          "address",
-          "https://attributes.spid.gov.it/expirationDate",
-          "https://attributes.spid.gov.it/digitalAddress"
+            "https://attributes.eid.gov.it/spid_code",
+            "given_name",
+            "family_name",
+            "place_of_birth",
+            "birthdate",
+            "gender",
+            "https://attributes.eid.gov.it/company_name",
+            "https://attributes.eid.gov.it/registered_office",
+            "https://attributes.eid.gov.it/fiscal_number",
+            "https://attributes.eid.gov.it/company_fiscal_number",
+            "https://attributes.eid.gov.it/vat_number",
+            "document_details",
+            "phone_number",
+            "email",
+            "https://attributes.eid.gov.it/e_delivery_service",
+            "https://attributes.eid.gov.it/eid_exp_date",
+            "address"
         ],
         "grant_types_supported": [
           "authorization_code",
@@ -668,22 +730,23 @@
             "https://www.spid.gov.it/SpidL3"
           ],
           "claims_supported": [
-              "https://attributes.spid.gov.it/spidCode",
-              "given_name",
-              "family_name",
-              "place_of_birth",
-              "date_of_birth",
-              "gender",
-              "https://attributes.spid.gov.it/companyName",
-              "https://attributes.spid.gov.it/registeredOffice",
-              "https://attributes.spid.gov.it/fiscal_number",
-              "https://attributes.spid.gov.it/ivaCode",
-              "https://attributes.spid.gov.it/idCard",
-              "https://attributes.spid.gov.it/mobilePhone",
-              "email",
-              "address",
-              "https://attributes.spid.gov.it/expirationDate",
-              "https://attributes.spid.gov.it/digitalAddress"
+            "https://attributes.eid.gov.it/spid_code",
+            "given_name",
+            "family_name",
+            "place_of_birth",
+            "birthdate",
+            "gender",
+            "https://attributes.eid.gov.it/company_name",
+            "https://attributes.eid.gov.it/registered_office",
+            "https://attributes.eid.gov.it/fiscal_number",
+            "https://attributes.eid.gov.it/company_fiscal_number",
+            "https://attributes.eid.gov.it/vat_number",
+            "document_details",
+            "phone_number",
+            "email",
+            "https://attributes.eid.gov.it/e_delivery_service",
+            "https://attributes.eid.gov.it/eid_exp_date",
+            "address"
           ],
           "grant_types_supported": [
             "authorization_code",
@@ -1443,22 +1506,23 @@
           "https://www.spid.gov.it/SpidL3"
         ],
         "claims_supported": [
-            "https://attributes.spid.gov.it/spidCode",
+            "https://attributes.eid.gov.it/spid_code",
             "given_name",
             "family_name",
             "place_of_birth",
-            "date_of_birth",
+            "birthdate",
             "gender",
-            "https://attributes.spid.gov.it/companyName",
-            "https://attributes.spid.gov.it/registeredOffice",
-            "https://attributes.spid.gov.it/fiscal_number",
-            "https://attributes.spid.gov.it/ivaCode",
-            "https://attributes.spid.gov.it/idCard",
-            "https://attributes.spid.gov.it/mobilePhone",
+            "https://attributes.eid.gov.it/company_name",
+            "https://attributes.eid.gov.it/registered_office",
+            "https://attributes.eid.gov.it/fiscal_number",
+            "https://attributes.eid.gov.it/company_fiscal_number",
+            "https://attributes.eid.gov.it/vat_number",
+            "document_details",
+            "phone_number",
             "email",
-            "address",
-            "https://attributes.spid.gov.it/expirationDate",
-            "https://attributes.spid.gov.it/digitalAddress"
+            "https://attributes.eid.gov.it/e_delivery_service",
+            "https://attributes.eid.gov.it/eid_exp_date",
+            "address"
         ],
         "grant_types_supported": [
           "authorization_code",
diff --git a/examples/provider/dumps/example.json b/examples/provider/dumps/example.json
index 0be5a350..96b332a2 100644
--- a/examples/provider/dumps/example.json
+++ b/examples/provider/dumps/example.json
@@ -15,15 +15,39 @@
     "email": "",
     "origin": null,
     "attributes": {
-      "https://attributes.spid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78",
+      "https://attributes.eid.gov.it/fiscal_number":"TINIT-ABCXYZ00W00Z000Z",
       "given_name": "peppe",
       "family_name": "maradona",
+      "place_of_birth":{
+        "region":"NA",
+        "locality":"F839"
+      },
+      "birthdate":"1980-10-10",
+      "gender":"male",
       "email": "that@ema.il",
-      "fiscal_number": "8sada89s7da89sd7a98sd78",
+      "email_verified": "true",
+      "document_details":{
+        "type":"cartaIdentita",
+        "document_number":"AS09452389",
+        "issuer":{
+          "name":"ComuneNapoli"
+        },
+        "date_of_issuance":"2017-01-02",
+        "date_of_expiry":"2027-01-31"
+      },
       "sub": "5f32567af7e0e77ea09de8521ae5f6a0fd6984176e99a6bc694a8a0198231dc3",
       "username": "http://127.0.0.1:8000/oidc/op/__5f32567af7e0e77ea09de8521ae5f6a0fd6984176e99a6bc694a8a0198231dc3",
-      "first_name": "peppe",
-      "last_name": "maradona"
+      "phone_number":"39081322222",
+      "phone_number_verified":"true",
+      "https://attributes.eid.gov.it/e_delivery_service":"peppe@pec.it",
+      "https://attributes.eid.gov.it/landline_number ":"12345678901",
+      "address":{
+          "street_address":"Via Liszt 21",
+          "postal_code":"00144",
+          "locality":"Roma",
+          "region":"RM",
+          "country_code":"IT"
+      }
     },
     "groups": [],
     "user_permissions": []
@@ -45,11 +69,38 @@
     "email": "",
     "origin": null,
     "attributes": {
-      "https://attributes.spid.gov.it/fiscal_number": "AATTTJDFKSKDF89",
-      "given_name": "antonio",
-      "family_name": "rossi",
-      "email": "that@ema.il",
-      "fiscal_number": "8sada89s7da89sd7a98sd78"
+      "https://attributes.eid.gov.it/fiscal_number":"TINIT-AATTTJDFKSKDF89",
+      "given_name": "peppe",
+      "family_name": "maradona",
+      "place_of_birth":{
+        "region":"NA",
+        "locality":"F839"
+      },
+      "birthdate":"1990-10-10",
+      "gender":"male",
+      "email": "antonio@ema.il",
+      "email_verified": "true",
+      "document_details":{
+        "type":"cartaIdentita",
+        "document_number":"AS01111189",
+        "issuer":{
+          "name":"ComuneRoma"
+        },
+        "date_of_issuance":"2017-01-02",
+        "date_of_expiry":"2027-01-31"
+      },
+      "sub": "5f32567af7e0e77ea09de8521ae5f6a0fd6984176e99a6bc694a8a0198231dc3",
+      "username": "http://127.0.0.1:8000/oidc/op/__5f32567af7e0e77ea09de8521ae5f6a0fd6984176e99a6bc694a8a0198231dc3",
+      "phone_number":"39081322222",
+      "phone_number_verified":"true",
+      "https://attributes.eid.gov.it/e_delivery_service":"peppe@pec.it",
+      "address":{
+          "street_address":"Via Liszt 21",
+          "postal_code":"00144",
+          "locality":"Roma",
+          "region":"RM",
+          "country_code":"IT"
+      }
     },
     "groups": [],
     "user_permissions": []
diff --git a/examples/relying_party/dumps/example.json b/examples/relying_party/dumps/example.json
index 0bc61854..ad45e395 100644
--- a/examples/relying_party/dumps/example.json
+++ b/examples/relying_party/dumps/example.json
@@ -226,22 +226,23 @@
             "https://www.spid.gov.it/SpidL3"
           ],
           "claims_supported": [
-              "https://attributes.spid.gov.it/spidCode",
+              "https://attributes.eid.gov.it/spid_code",
               "given_name",
               "family_name",
               "place_of_birth",
-              "date_of_birth",
+              "birthdate",
               "gender",
-              "https://attributes.spid.gov.it/companyName",
-              "https://attributes.spid.gov.it/registeredOffice",
-              "https://attributes.spid.gov.it/fiscal_number",
-              "https://attributes.spid.gov.it/ivaCode",
-              "https://attributes.spid.gov.it/idCard",
-              "https://attributes.spid.gov.it/mobilePhone",
+              "https://attributes.eid.gov.it/company_name",
+              "https://attributes.eid.gov.it/registered_office",
+              "https://attributes.eid.gov.it/fiscal_number",
+              "https://attributes.eid.gov.it/company_fiscal_number",
+              "https://attributes.eid.gov.it/vat_number",
+              "document_details",
+              "phone_number",
               "email",
-              "address",
-              "https://attributes.spid.gov.it/expirationDate",
-              "https://attributes.spid.gov.it/digitalAddress"
+              "https://attributes.eid.gov.it/e_delivery_service",
+              "https://attributes.eid.gov.it/eid_exp_date",
+              "address"
           ],
           "grant_types_supported": [
             "authorization_code",
@@ -796,22 +797,23 @@
           "https://www.spid.gov.it/SpidL3"
         ],
         "claims_supported": [
-            "https://attributes.spid.gov.it/spidCode",
+            "https://attributes.eid.gov.it/spid_code",
             "given_name",
             "family_name",
             "place_of_birth",
-            "date_of_birth",
+            "birthdate",
             "gender",
-            "https://attributes.spid.gov.it/companyName",
-            "https://attributes.spid.gov.it/registeredOffice",
-            "https://attributes.spid.gov.it/fiscal_number",
-            "https://attributes.spid.gov.it/ivaCode",
-            "https://attributes.spid.gov.it/idCard",
-            "https://attributes.spid.gov.it/mobilePhone",
+            "https://attributes.eid.gov.it/company_name",
+            "https://attributes.eid.gov.it/registered_office",
+            "https://attributes.eid.gov.it/fiscal_number",
+            "https://attributes.eid.gov.it/company_fiscal_number",
+            "https://attributes.eid.gov.it/vat_number",
+            "document_details",
+            "phone_number",
             "email",
-            "address",
-            "https://attributes.spid.gov.it/expirationDate",
-            "https://attributes.spid.gov.it/digitalAddress"
+            "https://attributes.eid.gov.it/e_delivery_service",
+            "https://attributes.eid.gov.it/eid_exp_date",
+            "address"
         ],
         "grant_types_supported": [
           "authorization_code",
diff --git a/spid_cie_oidc/provider/schemas/authn_requests.py b/spid_cie_oidc/provider/schemas/authn_requests.py
index 2822e26b..f425c4e5 100644
--- a/spid_cie_oidc/provider/schemas/authn_requests.py
+++ b/spid_cie_oidc/provider/schemas/authn_requests.py
@@ -53,28 +53,28 @@ class UserInfoSpid(BaseModel):
         alias="place_of_birth", default=None
     )
     date_of_birth: Optional[dict] = Field(
-        alias="date_of_birth", default=None
+        alias="birthdate", default=None
     )
     gender: Optional[dict] = Field(
         alias="gender", default=None
     )
     company_name: Optional[dict] = Field(
-        alias="https://attributes.spid.gov.it/companyName", default=None
+        alias="https://attributes.eid.gov.it/company_name", default=None
     )
     registered_office: Optional[dict] = Field(
-        alias="https://attributes.spid.gov.it/registeredOffice", default=None
+        alias="https://attributes.eid.gov.it/registered_office", default=None
     )
     fiscal_number: Optional[dict] = Field(
-        alias="https://attributes.spid.gov.it/fiscal_number", default=None
+        alias="https://attributes.eid.gov.it/fiscal_number", default=None
     )
     iva_code: Optional[dict] = Field(
-        alias="https://attributes.spid.gov.it/ivaCode", default=None
+        alias="https://attributes.eid.gov.it/vat_number", default=None
     )
     id_card: Optional[dict] = Field(
-        alias="https://attributes.spid.gov.it/idCard", default=None
+        alias="https://attributes.eid.gov.it/document_details", default=None
     )
     mobile_phone: Optional[dict] = Field(
-        alias="https://attributes.spid.gov.it/mobilePhone", default=None
+        alias="https://attributes.eid.gov.it/phone_number", default=None
     )
     email: Optional[dict] = Field(
         alias="email", default=None
@@ -83,10 +83,10 @@ class UserInfoSpid(BaseModel):
         alias="address", default=None
     )
     expiration_date: Optional[dict] = Field(
-        alias="https://attributes.spid.gov.it/expirationDate", default=None
+        alias="https://attributes.eid.gov.it/eid_exp_date", default=None
     )
     digital_address: Optional[dict] = Field(
-        alias="https://attributes.spid.gov.it/digitalAddress", default=None
+        alias="https://attributes.eid.gov.it/e_delivery_service", default=None
     )
 
 
diff --git a/spid_cie_oidc/provider/settings.py b/spid_cie_oidc/provider/settings.py
index bf2f11d9..4d49532e 100644
--- a/spid_cie_oidc/provider/settings.py
+++ b/spid_cie_oidc/provider/settings.py
@@ -37,32 +37,32 @@
     },
 )
 OIDCFED_PROVIDER_ATTRIBUTES_SPID_MAP = {
-    "https://attributes.spid.gov.it/spidCode": (
+    "https://attributes.eid.gov.it/spid_code": (
         {
             "func": "spid_cie_oidc.provider.processors.spidCode",
             "kwargs": {"salt": "signiicusenz"},
         },
     ),
-    "given_name": ("name", "given_name"),
-    "family_name": ("family_name", "surname"),
+    "given_name": ("given_name",),
+    "family_name": ("family_name",),
     "place_of_birth": ("place_of_birth",),
-    "county_of_birth": ("county_of_birth",),
-    "date_of_birth": ("date_of_birth", "birthdate"),
+    "birthdate": ("birthdate",),
     "gender": ("gender",),
-    "https://attributes.spid.gov.it/companyName": ("company_name",),
-    "https://attributes.spid.gov.it/registeredOffice": ("registered_office",),
-    "https://attributes.spid.gov.it/fiscal_number": ("fiscal_number", "tin"),
-    "https://attributes.spid.gov.it/ivaCode": ("iva_code",),
-    "https://attributes.spid.gov.it/idCard": ("id_card",),
-    "https://attributes.spid.gov.it/mobilePhone": (
+    "https://attributes.eid.gov.it/company_name": ("company_name",),
+    "https://attributes.eid.gov.it/registered_office": ("registered_office",),
+    "https://attributes.eid.gov.it/fiscal_number": ("fiscal_number", ),
+    "https://attributes.eid.gov.it/company_fiscal_number": ("company_fiscal_number",),
+    "https://attributes.eid.gov.it/vat_number": ("vat_number",),
+    "document_details": ("document_details",),
+    "phone_number": ("phone_number",
         "mobile_phone",
         "phone",
         "telephone",
     ),
     "email": ("email",),
+    "https://attributes.eid.gov.it/e_delivery_service": ("e_delivery_service",),
+    "https://attributes.eid.gov.it/eid_exp_date": ("eid_exp_date",),
     "address": ("address",),
-    "https://attributes.spid.gov.it/expirationDate": ("expiration_date",),
-    "https://attributes.spid.gov.it/digitalAddress": ("digital_address",),
 }
 
 OIDCFED_PROVIDER_ATTRIBUTES_CIE_MAP = {
@@ -174,18 +174,18 @@
     "given_name": _("Name"),
     "family_name": _("Family name"),
     "place_of_birth": _("Place of birth"),
-    "date_of_birth": _("Date of birth"),
+    "birthdate": _("Date of birth"),
     "gender": _("Gender"),
-    "https://attributes.spid.gov.it/companyName": _("Company Name"),
-    "https://attributes.spid.gov.it/registeredOffice": _("Registered Office"),
-    "https://attributes.spid.gov.it/fiscal_number": _("Tax payer id"),
-    "https://attributes.spid.gov.it/ivaCode": _("Vat number"),
-    "https://attributes.spid.gov.it/idCard": _("Id card"),
-    "https://attributes.spid.gov.it/mobilePhone": _("Mobile phone"),
+    "https://attributes.eid.gov.it/company_name": _("Company Name"),
+    "https://attributes.eid.gov.it/registered_office": _("Registered Office"),
+    "https://attributes.eid.gov.it/fiscal_number": _("Tax payer id"),
+    "https://attributes.eid.gov.it/vat_number": _("Vat number"),
+    "document_details": _("Id card"),
+    "phone_number": _("Mobile phone"),
     "email": _("Email"),
     "address": _("Address"),
-    "https://attributes.spid.gov.it/expirationDate": _("Expiration date"),
-    "https://attributes.spid.gov.it/digitalAddress": _("Digital address"),
+    "https://attributes.eid.gov.it/eid_exp_date": _("Expiration date"),
+    "https://attributes.eid.gov.it/e_delivery_service": _("Digital address"),
 
     # CIE
     "given_name": _("Name"),
diff --git a/spid_cie_oidc/relying_party/settings.py b/spid_cie_oidc/relying_party/settings.py
index bb8f53df..7cf59df3 100644
--- a/spid_cie_oidc/relying_party/settings.py
+++ b/spid_cie_oidc/relying_party/settings.py
@@ -65,7 +65,7 @@
             "email",
             "email",
         ),
-        "fiscal_number": ("https://attributes.spid.gov.it/fiscal_number", "fiscal_number"),
+        "fiscal_number": ("https://attributes.eid.gov.it/fiscal_number", "fiscal_number"),
     },
 )
 
@@ -82,7 +82,7 @@
             "given_name": None,
             "family_name": None,
             "email": None,
-            "https://attributes.spid.gov.it/fiscal_number": None,
+            "https://attributes.eid.gov.it/fiscal_number": None,
         },
     },
 )
@@ -96,7 +96,7 @@
             "given_name": None,
             "family_name": None,
             "email": None,
-            "https://attributes.spid.gov.it/fiscal_number": None
+            "https://attributes.eid.gov.it/fiscal_number": None
         },
     },
 )


Test patch:
diff --git a/spid_cie_oidc/provider/tests/authn_request_settings.py b/spid_cie_oidc/provider/tests/authn_request_settings.py
index 5b602bc1..a22e1a24 100644
--- a/spid_cie_oidc/provider/tests/authn_request_settings.py
+++ b/spid_cie_oidc/provider/tests/authn_request_settings.py
@@ -10,7 +10,7 @@
     "userinfo": {
         "given_name": {"values": ["str", "str"]},
         "family_name": None,
-        "date_of_birth": {"value": "str"},
+        "birthdate": {"value": "str"},
     },
 }
 
diff --git a/spid_cie_oidc/provider/tests/settings.py b/spid_cie_oidc/provider/tests/settings.py
index 9146c93a..4b4cd67f 100644
--- a/spid_cie_oidc/provider/tests/settings.py
+++ b/spid_cie_oidc/provider/tests/settings.py
@@ -35,22 +35,23 @@
                 "https://www.spid.gov.it/SpidL3",
             ],
             "claims_supported": [
-                "https://attributes.spid.gov.it/spidCode",
+                "https://attributes.eid.gov.it/spid_code",
                 "given_name",
                 "family_name",
                 "place_of_birth",
-                "date_of_birth",
+                "birthdate",
                 "gender",
-                "https://attributes.spid.gov.it/companyName",
-                "https://attributes.spid.gov.it/registeredOffice",
-                "https://attributes.spid.gov.it/fiscal_number",
-                "https://attributes.spid.gov.it/ivaCode",
-                "https://attributes.spid.gov.it/idCard",
-                "https://attributes.spid.gov.it/mobilePhone",
+                "https://attributes.eid.gov.it/company_name",
+                "https://attributes.eid.gov.it/registered_office",
+                "https://attributes.eid.gov.it/fiscal_number",
+                "https://attributes.eid.gov.it/company_fiscal_number",
+                "https://attributes.eid.gov.it/vat_number",
+                "document_details",
+                "phone_number",
                 "email",
-                "address",
-                "https://attributes.spid.gov.it/expirationDate",
-                "https://attributes.spid.gov.it/digitalAddress",
+                "https://attributes.eid.gov.it/e_delivery_service",
+                "https://attributes.eid.gov.it/eid_exp_date",
+                "address"
             ],
             "grant_types_supported": ["authorization_code", "refresh_token"],
             "id_token_signing_alg_values_supported": ["RS256", "ES256"],
diff --git a/spid_cie_oidc/relying_party/tests/mocked_response.py b/spid_cie_oidc/relying_party/tests/mocked_response.py
index 5df10c1b..c5d80563 100644
--- a/spid_cie_oidc/relying_party/tests/mocked_response.py
+++ b/spid_cie_oidc/relying_party/tests/mocked_response.py
@@ -193,7 +193,7 @@ def __init__(self):
     def content(self):
         jwt = {
             "sub": 'asdasdasdasasdasdas',
-            "https://attributes.spid.gov.it/fiscal_number": "sdfsfs908df09s8df90s8fd0"
+            "https://attributes.eid.gov.it/fiscal_number": "sdfsfs908df09s8df90s8fd0"
         }
         jws = create_jws(jwt, op_conf_priv_jwk)
         jwe = create_jwe(