Skip to content

Commit

Permalink
chore: change of SPID attributes in docs, tests and settings
Browse files Browse the repository at this point in the history
  • Loading branch information
rglauco committed Oct 14, 2023
1 parent 9a2f3a0 commit 9fea5eb
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 126 deletions.
34 changes: 17 additions & 17 deletions docs/FEDERATION_METADATA_POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions docs/technical_specifications/RELYING_PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
)
Expand Down
93 changes: 48 additions & 45 deletions examples/federation_authority/dumps/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"email": "",
"origin": null,
"attributes": {
"https://attributes.spid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78",
"https://attributes.eid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78",
"given_name": "peppe",
"family_name": "maradona",
"email": "[email protected]",
Expand Down Expand Up @@ -45,7 +45,7 @@
"email": "",
"origin": null,
"attributes": {
"https://attributes.spid.gov.it/fiscal_number": "AATTTJDFKSKDF89",
"https://attributes.eid.gov.it/fiscal_number": "AATTTJDFKSKDF89",
"given_name": "antonio",
"family_name": "rossi",
"email": "[email protected]",
Expand Down Expand Up @@ -306,22 +306,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",
Expand Down Expand Up @@ -668,22 +669,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",
Expand Down Expand Up @@ -1443,22 +1445,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",
Expand Down
4 changes: 2 additions & 2 deletions examples/provider/dumps/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"email": "",
"origin": null,
"attributes": {
"https://attributes.spid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78",
"https://attributes.eid.gov.it/fiscal_number": "8sada89s7da89sd7a98sd78",
"given_name": "peppe",
"family_name": "maradona",
"email": "[email protected]",
Expand Down Expand Up @@ -45,7 +45,7 @@
"email": "",
"origin": null,
"attributes": {
"https://attributes.spid.gov.it/fiscal_number": "AATTTJDFKSKDF89",
"https://attributes.eid.gov.it/fiscal_number": "AATTTJDFKSKDF89",
"given_name": "antonio",
"family_name": "rossi",
"email": "[email protected]",
Expand Down
46 changes: 24 additions & 22 deletions examples/relying_party/dumps/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions spid_cie_oidc/provider/schemas/authn_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)


Expand Down
18 changes: 9 additions & 9 deletions spid_cie_oidc/provider/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion spid_cie_oidc/provider/tests/authn_request_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"userinfo": {
"given_name": {"values": ["str", "str"]},
"family_name": None,
"date_of_birth": {"value": "str"},
"birthdate": {"value": "str"},
},
}

Expand Down
Loading

0 comments on commit 9fea5eb

Please sign in to comment.