Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def authenticate(self, username, password):
- if self.config.get('LDAP_USER_RDN_ATTR') == self.config.get('LDAP_USER_LOGIN_ATTR'):
- # Since the user's RDN is the same as the login field,
- # we can do a direct bind.
- result = self.authenticate_direct_bind(username, password)
- else:
- # We need to search the User's DN to find who the user is (and their DN)
- # so we can try bind with their password.
- result = self.authenticate_search_bind(username, password)
- return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement