0

I want to use LDAP AUTH for django. For the moment I have also a django Model Backend where are all my users and theirs groups.

In my code, an user passes a test in order to access to application. This operation check if the group to allow is in the user information.

But now I wanted to stop using Model Authentication and use only LDAP AUTH...

How can I manage to use the same function to allow access, with LDAP groups without creating an user in the Model?

1 Answers1

0

I don't know much about LDAP is general, but you can follow this tutorial on how to login to LDAP using Python : http://blog.emfeld.com/2013/03/ldap-login-authentication-using-python.html

Once you understand the basics, you can implement login in Django.

Hint : You will have to update the code of the login view. After getting the username and the password from the form, it will now search in LDAP instead of models

Amine Messaoudi
  • 2,141
  • 2
  • 20
  • 37