[Solved]-LDAP authentication with django REST


There is a package called django-auth-ldap.
It comes with a django authentification backend.
Just add django_auth_ldap.backend.LDAPBackend to your AUTHENTICATION_BACKENDS


You probably have to define a few more settings like you ldap host. But the documentation is quite good.

Then you can use your normal authentication views and django “decide” which method to use. There is more information in the django docs

Leave a comment