Skip to content

LDAP_AUTH_USER_FIELDS fails to map the retrieved data #282

@Bhav00

Description

@Bhav00

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions