PKG-INFO 4.1 KB

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