Hi Victor,

|--==> On Tue, 17 Jan 2012 11:30:03 +0100, Victor Fernandez de Alba 
<[email protected]> said:

  VFdA> Hi!
  VFdA> I'm trying to set up a pyramid project auth working with pyramid_who and
  VFdA> LDAP. I've managed to get it working with the repoze.who.plugins.ldap
  VFdA> repoze.who plugin as middleware, but unable to make it work in a
  VFdA> configuration called as an API. It seems the problem is with the
  VFdA> environ['repoze.who.logger'] which doesn't exist in a pure API call with
  VFdA> pyramid_who.

  VFdA> Is there any special config for logging in pyramid_who? I've been 
searching
  VFdA> for the answer in the source code but it seems that it is not
  VFdA> implemented... Maybe a .ini setting is needed?

I gave a quick look at the source code of repoze.who.plugins.ldap, and
it indeed seems to assume that environ['repoze.who.logger'] exists. I
believe it could be considered kind of a bug in the plugin.

A workaround could be to set it by hand in your code:

environ["repoze.who.logger"] = some_possibly_dummy_logger
api = API(environ, ...)

As I side note, you might want to consider repoze.who.plugins.pam
instead, as PAM supports a number of backends, LDAP being one of them.

Cheers,

Free

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to