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

LDAP_AUTH_USER_FIELDS fails to map the retrieved data #282

Open
Bhav00 opened this issue Jan 23, 2025 · 0 comments
Open

LDAP_AUTH_USER_FIELDS fails to map the retrieved data #282

Bhav00 opened this issue Jan 23, 2025 · 0 comments

Comments

@Bhav00
Copy link

Bhav00 commented Jan 23, 2025

LDAP_AUTH_USER_FIELDS = {
'username' : 'un',
'det1' : 'n1',
'det2' : 'n2',
'det3' : 'n3',
'det4' : 'n4',
}
During the LDAP, sometimes the code will end up executing correctly because the fields being mapped are present in the retrieved user details.
The code will run in the case where we have all the attributes available, [un, n1, n2, n3, n4].
But in case, there are attributes that were not received, say n3 and n4 are missing for some users, the auth happens and as the details were partially existing, the code will try to map the key to it and ends up with an error.

Is there a way to fetch all the available attributes, after the authentication was successfully done, I don't mind mapping manually later on after using the user class.

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

No branches or pull requests

1 participant