Hi,

I currently use a mod_python fixuphandler to set an environment variable 
USER_EMAIL.
The value for this variable I get from a ldap request based on the user name 
that had been set by an apache auth module.

def fixuphandler(req):
    remote_user = req.user.split('\\')[-1]
    l = ldap.initialize("ldap://myserver:389";)
    l.simple_bind_s("","")
    r = l.search_s("o=myorg", ldap.SCOPE_SUBTREE, "uid=%s" % remote_user)

    req.subprocess_env['USER_EMAIL'] = r[0][1]['mail'][0]
    return apache.OK


Since mod_python is dead (or dying) I am wondering if this is possible with 
mod_wsgi.

cheers
Dominik

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/modwsgi/-/yooYURHwJmMJ.
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/modwsgi?hl=en.

Reply via email to