Authentication 使用MoinMoin的Ldap身份验证不';行不通

Authentication 使用MoinMoin的Ldap身份验证不';行不通,authentication,ldap,openldap,moinmoin,Authentication,Ldap,Openldap,Moinmoin,我正在尝试将MoinMoin连接到我的ldap服务器,但是它不起作用。我的设置是否正确? 我正在使用Ubuntu存储库中的MoinMoin 这里我向您展示我的farmconfig.py: from farmconfig import FarmConfig # now we subclass that config (inherit from it) and change what's different: class Config(FarmConfig): # basic optio

我正在尝试将MoinMoin连接到我的ldap服务器,但是它不起作用。我的设置是否正确? 我正在使用Ubuntu存储库中的MoinMoin

这里我向您展示我的farmconfig.py:

from farmconfig import FarmConfig

# now we subclass that config (inherit from it) and change what's different:
class Config(FarmConfig):

    # basic options (you normally need to change these)
    sitename = u'MyWiki' # [Unicode]
    interwikiname = u'MyWiki' # [Unicode]

    # name of entry page / front page [Unicode], choose one of those:

    # a) if most wiki content is in a single language
    #page_front_page = u"MyStartingPage"

    # b) if wiki content is maintained in many languages
    page_front_page = u"FrontPage"

    data_dir = '/usr/share/moin/data'
    data_underlay_dir = '/usr/share/moin/underlay'


from MoinMoin.auth.ldap_login import LDAPAuth
ldap_authenticator1 = LDAPAuth(
    server_uri='ldap://192.168.1.196',
    bind_dn='cn=admin,ou=People,dc=company,dc=com',
    bind_pw='secret',
    scope=2,
    referrals=0,
    search_filter='(uid=%(username)s)',
    givenname_attribute='givenName',
    surname_attribute='sn',
    aliasname_attribute='displayName',
    email_attribute='mailRoutingAddress',
    email_callback=None,
    coding='utf-8',
    timeout=10,
    start_tls=0,
    tls_cacertdir=None,
    tls_cacertfile=None,
    tls_certfile=None,
    tls_keyfile=None,
    tls_require_cert=0,
    bind_once=True,
    autocreate=True,
)
auth = [ldap_authenticator1, ]
cookie_lifetime = 1

这是一个缩进问题,身份验证和cookie_生存期必须在类配置中(所以只需缩进4个空格)。

谢谢,这就是问题所在,缩进