-
Notifications
You must be signed in to change notification settings - Fork 29
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
Conversation
) | ||
|
||
def get_client_organisation_name(self, tc): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
organization
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", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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", "") | |
) |
There was a problem hiding this comment.
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", "")
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>
fix: Updated cryptography to 42.0.2 for rsa method