简单的中间件,在对LDAP服务器进行身份验证后将授权头插入请求中。
django-ldap-basic-auth的Python项目详细描述
django ldap basic auth
====
简单的中间件,在对ldap服务器进行身份验证后,在请求中注入授权头
如果在生产中使用basicauthentication,则必须确保api仅在https上可用。您还应该确保您的api客户端在登录时总是重新请求用户名和密码,并且永远不会将这些详细信息存储到永久存储中。
安装
==
您可以通过两种方式安装django ldap basic auth:使用pip或通过setup.py install
$pip install django ldap basic auth
然后修改您的设置。py
installed_apps=installed_apps+(
'django_ldap_basic_auth',
)
authentication_backends=('django_ldap_basic_auth.backends.ldapbasicauth backend',)+authentication_backends
中间件类=中间件类+(
'django_ldap_basic_auth.middleware.injectbasicauthmiddleware',
)
=true
如果要将信息存储在名为http_authorization的http cookie中,请放入您的设置中。py:
django_ldap_basic_auth_use_cookies=true
您还必须定义django缓存后端。
依赖项
==
*django>;=1.4.x
*django auth-ldap(https://pythonhhoosted.org/django auth-ldap/django auth-ldap/django/django-auth-ldap)
====
*改善测试
*检查django auth-ldap是否安装
>changlog
==br/>=1.4.x
=1.x
=1.x
=1.4.x
=1.x
=1.x
*1.x
*1.0.0.0.0.0.x
Django会坚持会话
*0.0.3
*使用http cookie存储数据
*0.0.4
*检查请求是否具有某个用户
====
简单的中间件,在对ldap服务器进行身份验证后,在请求中注入授权头
如果在生产中使用basicauthentication,则必须确保api仅在https上可用。您还应该确保您的api客户端在登录时总是重新请求用户名和密码,并且永远不会将这些详细信息存储到永久存储中。
安装
==
您可以通过两种方式安装django ldap basic auth:使用pip或通过setup.py install
$pip install django ldap basic auth
然后修改您的设置。py
installed_apps=installed_apps+(
'django_ldap_basic_auth',
)
authentication_backends=('django_ldap_basic_auth.backends.ldapbasicauth backend',)+authentication_backends
中间件类=中间件类+(
'django_ldap_basic_auth.middleware.injectbasicauthmiddleware',
)
=true
如果要将信息存储在名为http_authorization的http cookie中,请放入您的设置中。py:
django_ldap_basic_auth_use_cookies=true
您还必须定义django缓存后端。
依赖项
==
*django>;=1.4.x
*django auth-ldap(https://pythonhhoosted.org/django auth-ldap/django auth-ldap/django/django-auth-ldap)
====
*改善测试
*检查django auth-ldap是否安装
>changlog
==br/>=1.4.x
=1.x
=1.x
=1.4.x
=1.x
=1.x
*1.x
*1.0.0.0.0.0.x
Django会坚持会话
*0.0.3
*使用http cookie存储数据
*0.0.4
*检查请求是否具有某个用户