Hello

I am trying to get ldap auth running on turbogears2.1
The tg2app is working just fine without ldap. if i app the changes
described in "middleware.py", the app crashs
I only get the following traceback and can not find the problem.
The traceback is generated on "nosetests" or "paster serve
development.ini"


------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/tg2env/bin/nosetests", line 8, in <module>
    load_entry_point('nose==1.0.0', 'console_scripts', 'nosetests')()
  File "/usr/local/tg2env/lib/python2.6/site-packages/nose-1.0.0-
py2.6.egg/nose/core.py", line 118, in __init__
    **extra_args)
  File "/usr/lib/python2.6/unittest.py", line 816, in __init__
    self.parseArgs(argv)
  File "/usr/local/tg2env/lib/python2.6/site-packages/nose-1.0.0-
py2.6.egg/nose/core.py", line 135, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "/usr/local/tg2env/lib/python2.6/site-packages/nose-1.0.0-
py2.6.egg/nose/config.py", line 330, in configure
    self.plugins.begin()
  File "/usr/local/tg2env/lib/python2.6/site-packages/nose-1.0.0-
py2.6.egg/nose/plugins/manager.py", line 94, in __call__
    return self.call(*arg, **kw)
  File "/usr/local/tg2env/lib/python2.6/site-packages/nose-1.0.0-
py2.6.egg/nose/plugins/manager.py", line 162, in simple
    result = meth(*arg, **kw)
  File "/usr/local/tg2env/lib/python2.6/site-packages/Pylons-1.0-
py2.6.egg/pylons/test.py", line 74, in begin
    relative_to=path)
  File "/usr/local/tg2env/lib/python2.6/site-packages/
PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 203, in
loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/local/tg2env/lib/python2.6/site-packages/
PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 224, in
loadobj
    return context.create()
  File "/usr/local/tg2env/lib/python2.6/site-packages/
PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 617, in
create
    return self.object_type.invoke(self)
  File "/usr/local/tg2env/lib/python2.6/site-packages/
PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 109, in
invoke
    return fix_call(context.object, context.global_conf,
**context.local_conf)
  File "/usr/local/tg2env/lib/python2.6/site-packages/
PasteDeploy-1.3.4-py2.6.egg/paste/deploy/util/fixtypeerror.py", line
57, in fix_call
    val = callable(*args, **kw)
  File "/usr/local/tg2app/aqportal/aqportal/config/middleware.py",
line 43, in make_app
    app = make_who_with_config(app, global_conf,
app_conf['who.config_file'])
  File "/usr/local/tg2env/lib/python2.6/site-packages/
repoze.who-1.0.19-py2.6.egg/repoze/who/config.py", line 138, in
make_middleware_with_config
    parser.parse(open(config_file))
  File "/usr/local/tg2env/lib/python2.6/site-packages/
repoze.who-1.0.19-py2.6.egg/repoze/who/config.py", line 80, in parse
    obj = self._makePlugin(name, IPlugin, options)
  File "/usr/local/tg2env/lib/python2.6/site-packages/
repoze.who-1.0.19-py2.6.egg/repoze/who/config.py", line 39, in
_makePlugin
    obj = obj(**options)
TypeError: __init__() takes at least 3 non-keyword arguments (1
given); got ({'error_...ue'}, beaker.session.key=...,
beaker.session.secret=..., cache_dir=..., full_stack=...,
sqlalchemy.echo=..., sqlalchemy.echo_pool=...,
sqlalchemy.pool_recycle=..., sqlalchemy.url=...,
templating.genshi.method=...,
templating.mako.compiled_templates_dir=...,
templating.mako.reloadfromdisk=...,
toscawidgets.framework.resource_variant=..., who.config_file=...,
who.log_file=..., who.log_level=...), wanted (global_conf,
full_stack=True, **app_conf)



------------------------------------------------------------  who.ini

[plugin:form]
use = repoze.who.plugins.form:make_redirecting_plugin
login_form_url = /login
login_handler_path = /login_handler
logout_handler_path = /logout_handler
rememberer_name = auth_tkt

[plugin:auth_tkt]
use = repoze.who.plugins.auth_tkt:make_plugin
secret = something

[plugin:ldap_auth]
use = repoze.who.plugins.ldap:LDAPAuthenticatorPlugin
ldap_uri    = ldap://127.0.0.1
base_dn     = dc=example.dc=com
bind_dn     = cn=service,dc=example.dc=com
bind_pw     = password
user_attr   = uid
dbsession   = aqportal.model:DBSession
user_class  = aqportal.model:User
group_class = aqportal.model:Group
perm_class  = aqportal.model:Permission

[plugin:ldap_attributes]
use = repoze.who.plugins.ldap:LDAPAttributesPlugin
ldap_connection = ldap://127.0.0.1

[plugin:sa_auth]
use = repoze.who.plugins.sa:make_sa_authenticator
user_class = aqportal.model:User
dbsession = aqportal.model:DBSession

[plugin:sa_mdp]
use = repoze.who.plugins.sa:make_sa_user_mdprovider
user_class = aqportal.model:User
dbsession = aqportal.model:DBSession

[general]
request_classifier = repoze.who.classifiers:default_request_classifier
challenge_decider = repoze.who.classifiers:default_challenge_decider

[identifiers]
plugins =
    form;browser
    auth_tkt

[authenticators]
plugins =
        ldap_auth
#       sa_auth

[challengers]
plugins =
    form;browser

[mdproviders]
plugins =
        ldap_auth
#       ldap_attributes
#       sa_mdp


------------------------------------------------------------
development.ini
--- cut ----
who.config_file = %(here)s/who.ini
who.log_level = debug
#who.log_level = warning
who.log_file = stdout
--- cut ----


------------------------------------------------------------
middleware.py
    app = make_who_with_config(app, global_conf,
app_conf['who.config_file'],
               app_conf['who.log_file'],
               app_conf['who.log_level'])


THX 4 Help!

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to