Hello,
I have an app that is going to be run behind apache using mod_wsgi.
In addition i have apache running http auth(via LDAP) and I can verify that
request.environ.get('REMOTE_USER') is being set.
Now I need to figure out how to get TG2 to set the identity.
I wrote an Identifier, as explained at
http://static.repoze.org/whodocs/narr.html#writing-an-identifier-plugin
class MyIdentifier(object):
def identify(self, environ):
login = request.environ.get('REMOTE_USER').lower()
if login:
u = model.Users.select_by(login=login).one()
#set tg2 env ??
else:
raise Exception('could not find the correct user for %s'%login)
def remember(self, envrion, identity):
pass
def forget(self, envrion, identity):
pass
My real question is how to "attach" this to TG2. I belive this lives
somewhere in myapp.config.app_cfg, but I am not sure how that works.
http://turbogears.org/2.0/docs/main/Auth/Authorization.html#how-turbogears-deals-with-repoze-what-internallyis
a good resourse, but I just need this last little bit.
Thanks,
Dave
--
David Pattison
530.220.5043
http://davidspattison.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---