Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added method to show correct RP organization_name in OP pages #305

Merged
merged 10 commits into from
Feb 7, 2024

Conversation

rglauco
Copy link
Collaborator

@rglauco rglauco commented Feb 7, 2024

fix: Updated cryptography to 42.0.2 for rsa method

@peppelinux peppelinux changed the base branch from dev to main February 7, 2024 07:48
)

def get_client_organisation_name(self, tc):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

organization

Comment on lines 400 to 408
fed_metadata = tc.metadata.get("federation_entity", {})
name = fed_metadata.get("organization_name", "")
if not name:
op_metadata = tc.metadata.get("openid_relying_party", {})
name = op_metadata.get("organization_name", "")
if not name:
name = op_metadata.get("client_name", "")
if not name:
name = op_metadata.get("client_id", "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fed_metadata = tc.metadata.get("federation_entity", {})
name = fed_metadata.get("organization_name", "")
if not name:
op_metadata = tc.metadata.get("openid_relying_party", {})
name = op_metadata.get("organization_name", "")
if not name:
name = op_metadata.get("client_name", "")
if not name:
name = op_metadata.get("client_id", "")
rp_metadata = (
tc.metadata.get(
"federation_entity", {}
).get("organization_name", "") or
tc.metadata.get(
"openid_relying_party", {}
)
)
if rp_metadata:
name = (
rp_metadata.get("organization_name", "") or
rp_metadata.get("client_name", "") or
rp_metadata.get("client_id", "")
)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accepted change, corrected a typo:
rp_metadata = (
tc.metadata.get(
"federation_entity", {}
) .get("organization_name", "")

rglauco and others added 4 commits February 7, 2024 12:00
Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
@peppelinux peppelinux merged commit 5355473 into italia:main Feb 7, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants