跳转到主要内容

允许TiddlyWeb用户通过LDAP服务器进行身份验证。

项目描述

[![构建状态](https://travis-ci.org/pads/tiddlywebplugins.ldapauth.png)](https://travis-ci.org/pads/tiddlywebplugins.ldapauth)
[![覆盖率状态](https://coveralls.io/repos/pads/tiddlywebplugins.ldapauth/badge.png)](https://coveralls.io/r/pads/tiddlywebplugins.ldapauth)
[![最新发布](https://pypip.in/v/tiddlywebplugins.ldapauth/badge.png)](https://crate.io/packages/tiddlywebplugins.ldapauth/)
关于
=====

允许TiddlyWeb用户通过LDAP服务器进行身份验证。

已与OpenLDAP进行测试,但也可以使用其他符合LDAP的服务器(例如Active Directory)。

要求
============

* [Python](https://pythonlang.cn/)。
* [pip](http://www.pip-installer.org/en/latest/)。
* make。
* 一个用于测试的工作TiddlyWeb实例。
* [py.test](https://pytest.cn/latest/) 以运行测试。
* 一个具有密码的用户LDAP服务器(例如[OpenLDAP](openldap.org))。

修改
=========

了解如何使用此项目的最佳方式是查看`.travis.yml`文件。

`setup.py`用于打包插件、安装和分发。

插件代码位于`tiddlywebplugins`目录中。

测试位于`test`目录中。

* `make test`运行测试。
* `make test_with_coverage`运行带有`pytest-cov`代码覆盖率报告的测试。
* `make pep8`在代码上运行pep8以检查样式合规性。
* `make install`将插件作为包安装到您的系统上
(您可能需要sudo)。
* `make release`打包并将插件上传到[PyPI](http://pypi.python.org/pypi)进行分发。

设置LDAP
===============

请参阅[此指南](http://pads.tiddlyspace.com/OpenLDAP%20Setup)。

插件安装
===================

需要以下操作系统包

apt-get install libldap2-dev libsasl2-dev

在基于Redhat的系统上这是

yum install openldap-devel

然后安装tiddlywebplugins.ldapauth

pip install -U tiddlywebplugins.ldapauth

TiddlyWeb配置
=======================

在TiddlyWeb配置中引用插件作为认证系统插件,例如

`'auth_systems': ['tiddlywebplugins.ldapauth']`

配置一个LDAP服务器以进行通信。如果没有指定,则默认连接为`127.0.0.1:389`。

'ldapauth': {
'ldap_host': 'my.ldapserver.com',
'ldap_port': '3890',
'ldap_base_dn': 'dc=my,dc=domain'
'ldap_tiddlyspace_mode': True
}

如果没有指定`ldap_base_dn`,则假定`dc=localhost`。

`'ldap_tiddlyspace_mode': True`仅适用于需要CSRF令牌的TiddlySpace安装。

用法
=====

用于认证的URL将以

`challenge/tiddlywebplugins.ldapauth`结尾

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

tiddlywebplugins.ldapauth-0.1.1.tar.gz (5.9 kB 查看哈希值)

上传时间

由支持