Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1.  
  2. def authenticate(self, username, password):
  3. if self.config.get('LDAP_USER_RDN_ATTR') == self.config.get('LDAP_USER_LOGIN_ATTR'):
  4. # Since the user's RDN is the same as the login field,
  5. # we can do a direct bind.
  6. result = self.authenticate_direct_bind(username, password)
  7. else:
  8. # We need to search the User's DN to find who the user is (and their DN)
  9. # so we can try bind with their password.
  10. result = self.authenticate_search_bind(username, password)
  11.  
  12. return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement