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

add configurable username claim #280

Merged
merged 3 commits into from
Aug 8, 2019
Merged

Conversation

jeff-sternberg
Copy link

@jeff-sternberg jeff-sternberg commented Aug 5, 2019

This is a suggestion to fix #213 that is similar to #224, but provides a configurable username_claim attribute.

Logic:

  1. Read value of c.AzureAdOAuthenticator.username_claim
  2. Fall back to oidname if config isn't set

closes #224

oauthenticator/azuread.py Outdated Show resolved Hide resolved
oauthenticator/azuread.py Outdated Show resolved Hide resolved
@betatim
Copy link
Member

betatim commented Aug 6, 2019

Thanks for the quick turn around! This PR looks ready to go after my double check comment. I'd merge this as is and then we can have a second PR to switch over get_tenant (or make an issue for later).

@minrk
Copy link
Member

minrk commented Aug 8, 2019

Fall back to oid if config isn't set

Looks like the fallback is to name if it isn't set. Does this PR mean to change this to oid?

@jeff-sternberg
Copy link
Author

@minrk originally yes that was the intent, but as @betatim suggested, if we fall back to name that will be backwards compatible. Also with this change, a user can configure oid if desired.

@minrk
Copy link
Member

minrk commented Aug 8, 2019

Sorry, should have read through better. Thanks!

@minrk minrk merged commit 158eb20 into jupyterhub:master Aug 8, 2019
@jeff-sternberg
Copy link
Author

No worries, and thanks for merging!

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.

Do not use Azure AD display name as username
3 participants