After spending countless hours trying to test with identity, I can't
get it to work. I've tried to find out what is going on and what I
found seems strange to me. A single request using
testutil.createRequest (which BrowserSession also uses) is generating
three calls to identity_from_visit in visitor.py. And they don't all
have the same visit_key. I put this print statment in
identity_from_visit:
print visit_key, ident.user_name, ident.anonymous
and for a request similar to this:
testutil.create_request('/login/?user_name=me&password=pass&login=Login')
get this output:
669ce0008c969a88c87be1d494fc6d6227f255e4 randall False
e61ed22e132786b14de1d5ae76ff0ea142d57f32 None True
e61ed22e132786b14de1d5ae76ff0ea142d57f32 None True
So it apparently logs in successfully the first time, then for some
reason makes two additional requests to identity_from_visit with a
different visit_key before returning a response. Same thing happens
with BrowserSession and here is my config update statement:
turbogears.config.update({
'sqlalchemy.dburi': cns,
'visit.on': True,
'visit.manager': 'sqlalchemy',
'visit.saprovider.model': 'tgwater.model.Visit',
'identity.on': True,
'identity.provider': 'sqlalchemy',
'identity.saprovider.model.user':'tgwater.model.User',
'identity.saprovider.model.group':'tgwater.model.Group',
'identity.saprovider.model.permission':'tgwater.model.Permission',
'identity.saprovider.model.visit':'tgwater.model.VisitIdentity',
'identity.saprovider.encryption_algorithm': 'md5',
'identity.failure_url': '/login'
})
I'll post back if I make any progress.
Randall
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---