On 17/11/2012 13:23, Zak wrote:
I'm trying to get the unauthenticated_userid immediately after
calling remember(), but it's always None. Does unauthenticated_userid
not get created until a full round-trip request is made with the user?
How can I get the unauthenticated_userid immediately? Here is the code
I'm using
headers = remember(request, user.data['GUID'])
request.response.headerlist.extend(headers)
# This should not be None, but it always is None right after authenticating
print unauthenticated_userid(request)
I guess you're using cookies. So remember() return a list of Set-Cookie
header. And unauthenticated_userid may use request.headers['Cookie']
It should work if you set request.cookies by hand before calling
unauthenticated_userid
--
You received this message because you are subscribed to the Google
Groups "pylons-discuss" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pylons-discuss/-/zdM8eoPhnBoJ.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.