PKG-INFO 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. Metadata-Version: 1.1
  2. Name: django-auth-ldap
  3. Version: 1.3.0
  4. Summary: Django LDAP authentication backend
  5. Home-page: https://bitbucket.org/illocution/django-auth-ldap
  6. Author: Peter Sagerson
  7. Author-email: psagers@ignorare.net
  8. License: BSD
  9. Description-Content-Type: UNKNOWN
  10. Description: This is a Django authentication backend that authenticates against an LDAP
  11. service. Configuration can be as simple as a single distinguished name template,
  12. but there are many rich configuration options for working with users, groups,
  13. and permissions.
  14. This version is supported on Python 2.7 and 3.4+; and Django 1.8 and 1.10+.
  15. Under Python 2, it requires `python-ldap
  16. <https://pypi.python.org/pypi/python-ldap>`_ >= 2.0; under Python 3, it uses
  17. `pyldap <https://pypi.python.org/pypi/pyldap>`_.
  18. * Repository: https://bitbucket.org/illocution/django-auth-ldap
  19. * Documentation: https://django-auth-ldap.readthedocs.io/
  20. * Mailing list: https://groups.google.com/group/django-auth-ldap
  21. Following is an example configuration, just to whet your appetite::
  22. import ldap
  23. from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
  24. # Baseline configuration.
  25. AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com"
  26. AUTH_LDAP_BIND_DN = "cn=django-agent,dc=example,dc=com"
  27. AUTH_LDAP_BIND_PASSWORD = "phlebotinum"
  28. AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com",
  29. ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
  30. # or perhaps:
  31. # AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=users,dc=example,dc=com"
  32. # Set up the basic group parameters.
  33. AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=django,ou=groups,dc=example,dc=com",
  34. ldap.SCOPE_SUBTREE, "(objectClass=groupOfNames)"
  35. )
  36. AUTH_LDAP_GROUP_TYPE = GroupOfNamesType()
  37. # Simple group restrictions
  38. AUTH_LDAP_REQUIRE_GROUP = "cn=enabled,ou=django,ou=groups,dc=example,dc=com"
  39. AUTH_LDAP_DENY_GROUP = "cn=disabled,ou=django,ou=groups,dc=example,dc=com"
  40. # Populate the Django user from the LDAP directory.
  41. AUTH_LDAP_USER_ATTR_MAP = {
  42. "first_name": "givenName",
  43. "last_name": "sn",
  44. "email": "mail"
  45. }
  46. AUTH_LDAP_USER_FLAGS_BY_GROUP = {
  47. "is_active": "cn=active,ou=django,ou=groups,dc=example,dc=com",
  48. "is_staff": "cn=staff,ou=django,ou=groups,dc=example,dc=com",
  49. "is_superuser": "cn=superuser,ou=django,ou=groups,dc=example,dc=com"
  50. }
  51. # Use LDAP group membership to calculate group permissions.
  52. AUTH_LDAP_FIND_GROUP_PERMS = True
  53. # Cache group memberships for an hour to minimize LDAP traffic
  54. AUTH_LDAP_CACHE_GROUPS = True
  55. AUTH_LDAP_GROUP_CACHE_TIMEOUT = 3600
  56. # Keep ModelBackend around for per-user permissions and maybe a local
  57. # superuser.
  58. AUTHENTICATION_BACKENDS = (
  59. 'django_auth_ldap.backend.LDAPBackend',
  60. 'django.contrib.auth.backends.ModelBackend',
  61. )
  62. Keywords: django,ldap,authentication,auth
  63. Platform: UNKNOWN
  64. Classifier: Development Status :: 5 - Production/Stable
  65. Classifier: Environment :: Web Environment
  66. Classifier: Programming Language :: Python
  67. Classifier: Programming Language :: Python :: 2
  68. Classifier: Programming Language :: Python :: 2.7
  69. Classifier: Programming Language :: Python :: 3
  70. Classifier: Programming Language :: Python :: 3.4
  71. Classifier: Programming Language :: Python :: 3.5
  72. Classifier: Programming Language :: Python :: 3.6
  73. Classifier: Framework :: Django
  74. Classifier: Framework :: Django :: 1.8
  75. Classifier: Framework :: Django :: 1.10
  76. Classifier: Framework :: Django :: 1.11
  77. Classifier: Framework :: Django :: 2.0
  78. Classifier: Intended Audience :: Developers
  79. Classifier: Intended Audience :: System Administrators
  80. Classifier: License :: OSI Approved :: BSD License
  81. Classifier: Topic :: Internet :: WWW/HTTP
  82. Classifier: Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP
  83. Classifier: Topic :: Software Development :: Libraries :: Python Modules