Skip to content

Commit

Permalink
Saml2 (#302)
Browse files Browse the repository at this point in the history
* Fixed saml2 auth

* Fixed saml2 auth

* Fixed saml2 auth

* Fixed saml2 auth

* Fixed saml2 auth
  • Loading branch information
crisingulani authored Sep 5, 2024
1 parent d859c9c commit 04eb729
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backend/core/saml2.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def _update_user(self, user, attributes: dict, attribute_mapping: dict, force_sa
names = display_name.split()
user.first_name = names[0]
user.last_name = names[-1]
user.save() # saving in case of new user, the profile is linked.

user.profile.display_name = display_name
user.save()

Expand Down
2 changes: 1 addition & 1 deletion backend/pzserver/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
LOGIN_REDIRECT_URL = "/"

SAML_ATTRIBUTE_MAPPING = {
"eduPersonPrincipalName": ("username",),
"eduPersonUniqueId": ("username",),
"sn": ("name",),
"cn": ("full_name",),
"email": ("email",),
Expand Down

0 comments on commit 04eb729

Please sign in to comment.