对hug的基于ldap的身份验证支持

hug_authentication_ldap的Python项目详细描述


拥抱认证LDAP

PyPI versionBuild StatusCoverage StatusLicenseJoin the chat at https://gitter.im/timothycrosley/hug

为hug提供易于使用的基于ldap的身份验证支持:

importhugimporthug_authentication_ldapauthentication=hug_authentication_ldap.basic('myldap.server.net','uid={user_name},ou=people')@hug.get(requires=authentication)defsay_hello(hug_user):return'Hello {}!'.format(hug_user.name)

或者,对于hug中的通用可重用ldap密码验证:

importhugimporthug_authentication_ldapldap_check=hug_authentication_ldap.verify('myldap.server.net','uid={user_name},ou=people')@hug.get()defcheck(user_name,password):ifldap_check(user_name,password):returnTruereturnFalse

安装hug_authentication_ldap

安装hug_authentication_ldap非常简单:

pip3 install hug_authentication_ldap --upgrade

理想情况下,在虚拟环境中。

什么是hug_authentication_ldap?

hug的扩展,提供基于ldap的身份验证支持


谢谢,我希望你觉得拥抱认证有帮助

~timothy crosley

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在MVC中更新和查看当前窗口   检查输入是否为正确的java类型   java这个代码可以从数组中打印出随机字符串吗?   编译一起编译Java类   java需要编写一个通用函数,根据用户提供的输入,对地图中的对象进行类型转换   在Java中的DataInputStream中来回移动   java我的应用程序没有正确关闭,我不知道为什么   java在从地图检索数据时获得双方括号   用于解析的正则表达式出现java堆栈溢出错误   spring中使用jdbcTemplate的java批处理更新   JavaJAXB解组模式问题:“org。xml。萨克斯。SAXSparseException cvcelt。1'   java为什么SOAP在Spring Boot中将从客户端发送到服务器的obj数据请求为Null   java无法获取线程。中断工作   用Java发送XMLHttpRequest   java是连接到本地网络的机器列表的jTree   java是实现毕加索的最佳方法。生成器和onImageLoadFailed函数   java spring hibernate使用onetomany保存实体失败   Java拆分字符串位于|   Red Hat Developer Studio 12中的java JDBC驱动程序模板