/usr/lib/python2.7/dist-packages/django_python3_ldap/auth.py is in python-django-python3-ldap 0.9.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """
Django authentication backend.
"""
from django.contrib.auth.backends import ModelBackend
from django_python3_ldap import ldap
class LDAPBackend(ModelBackend):
"""
An authentication backend that delegates to an LDAP
server.
User models authenticated with LDAP are created on
the fly, and syncronised with the LDAP credentials.
"""
supports_inactive_user = False
def authenticate(self, *args, **kwargs):
return ldap.authenticate(*args, **kwargs)
|