-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature refactor saml modules #125
Feature refactor saml modules #125
Conversation
|
||
auth_info = {} | ||
if self.acr_mapping: | ||
auth_info["class_ref"] = self.acr_mapping.get(internal_response.auth_info.issuer, self.acr_mapping[""]) | ||
auth_info["class_ref"] = self.acr_mapping.get( | ||
internal_response.auth_info.issuer, self.acr_mapping[""]) |
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.
I think we could switch to get_dict_defaults()
here, instead of manually trying the ""
key.
I think this happens elsewhere too, and we can agree that get_dict_defaults
should dictate on how fallback keys should be checked (as a reminder there are two special/fallback keys: ""
and "default"
).
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.
I agree.
b1491d9
to
e87af90
Compare
This PR makes the code much more readable. I will merge it if no one else has something to add. |
This changeset is a generic cleanup on the saml base, frontend and backend modules.
I tried to make the code simpler and more readable, while avoiding repetition.
The general idea is that configuration keys should not be magic values all over the code and thus should be defined in the modules that uses the keys. Initialisation of common keys in the front and back end are handled by the base module.
While the changes may look a lot, most are formatting changes (whitespace, max line length, etc) and there are only a couple of actual code changes on how fallbacks are handled.
These happen on backend's
__init__
regardingkey_file_paths
and on the frontend's_handle_authn_response
function regarding howpolicy
settings are accessed to gather info aboutsign_assertion
,sign_response
,sign_alg
anddigest_alg
.PS: It should be easier to look at each commit separately