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 setting UPN_CLAIM allowing us to match the email instead of username #264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cusco
Copy link

@cusco cusco commented Nov 18, 2022

In our case we do not create new users. Instead, we onboard them previously through a different process and usernames follow a specific pattern instead of email address.

This PR adds the setting UPN_CLAIM that can be set to the email field. If this is set, the code will not attempt to match an existing user by username, but by the email field and claims upn instead.

If the user is being created it will still set the username field to the UPN

@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Merging #264 (defb63b) into master (896d65b) will decrease coverage by 0.3%.
The diff coverage is 72.7%.

@@           Coverage Diff            @@
##           master    #264     +/-   ##
========================================
- Coverage    86.3%   85.9%   -0.4%     
========================================
  Files           8       8             
  Lines         497     505      +8     
========================================
+ Hits          429     434      +5     
- Misses         68      71      +3     
Impacted Files Coverage Δ
django_auth_adfs/backend.py 85.7% <71.4%> (-0.7%) ⬇️
django_auth_adfs/config.py 87.8% <75.0%> (-0.3%) ⬇️

@JonasKs
Copy link
Member

JonasKs commented Mar 30, 2023

I'm a bit confused, why don't this setting work?

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.

2 participants