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

Allow AD auth with either sAMAccountName or userPrincipalName #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bmaupin
Copy link

@bmaupin bmaupin commented Dec 19, 2017

Hi, we're using TestRail and we'd like to authenticate to AD using userPrincipalName, so I updated the example to be able to do either sAMAccountName or userPrincipalName.

Because userPrincipalName can look like an email address (e.g. someone@cohowinery.com), with the previous code AD authentication would never happen if fallback was enabled. So fallback logic was moved to where it will only be triggered if AD authentication fails. This also permitted removal of the email comparison since it's no longer needed, so local usernames are no longer restricted to email addresses.

I also updated to the latest versions from docs.gurock.com.

Thanks!

Because userPrincipalName can look like an email address, AD authentication will
never happen if fallback is enabled. So fallback logic was moved to where it
will only be triggered if AD authentication fails. This also permitted removal
of the email comparison since it's no longer needed, allowing more flexibility
for local usernames.
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.

None yet

1 participant