小编Mur*_*ali的帖子

django-auth-ldap 安装不起作用

我正在尝试在我的 Windows 系统中安装 django-auth-ldap 它显示以下错误

\pip-build-3x6rkxb4\pyldap\modules\errors.h(8): 致命错误 C1083: 无法打开包含文件: 'lber.h': 没有这样的文件或目录错误: 命令 'C:\Program Files (x86) \Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' 失败,退出状态为 2

# LDAP auth settings.
LDAP_AUTH_URL = os.environ.get("LDAP_AUTH_URL", "ldap://xxx.xx.xx.xx:389")
LDAP_AUTH_USE_TLS = False

LDAP_AUTH_SEARCH_BASE = "dc=maxcrc,dc=com" 
LDAP_AUTH_OBJECT_CLASS = "inetOrgPerson"
LDAP_AUTH_USER_FIELDS = {
    "username": "uid",
    "first_name": "givenName",
    "last_name": "sn",
    "email": "mail",
}
LDAP_AUTH_USER_LOOKUP_FIELDS = ("username",)
LDAP_AUTH_CLEAN_USER_DATA = "django_python3_ldap.utils.clean_user_data"
LDAP_AUTH_SYNC_USER_RELATIONS = "django_python3_ldap.utils.sync_user_relations"
LDAP_AUTH_FORMAT_SEARCH_FILTERS = "django_python3_ldap.utils.format_search_filters"
LDAP_AUTH_FORMAT_USERNAME = "django_python3_ldap.utils.format_username_openldap"
LDAP_AUTH_ACTIVE_DIRECTORY_DOMAIN = None 
LDAP_AUTH_CONNECTION_USERNAME = "cn=Manager,dc=maxcrc,dc=com" 
LDAP_AUTH_CONNECTION_PASSWORD = "*****" 

LDAP_AUTH_CONNECT_TIMEOUT = None
LDAP_AUTH_RECEIVE_TIMEOUT = None …
Run Code Online (Sandbox Code Playgroud)

python authentication django ldap

8
推荐指数
2
解决办法
7044
查看次数

标签 统计

authentication ×1

django ×1

ldap ×1

python ×1