[Zope-dev] BrowserIdManager help!
Miles
miles at jamkit.com
Sun May 11 16:20:38 EDT 2008
Hi,
I am attempting to integrate a zope site with some other applications.
I'm trying to get another application to set the _ZopeId browser/session
cookie, so that users can move between the two with a single login.
This requires me to reproduce the code below, so a valid broser Id is
returned:
(from Products.Sessions.BrowserIdManager 505:512)
def getB64TStamp(
b2a=binascii.b2a_base64,gmtime=time.gmtime, time=time.time,
b64_trans=b64_trans, split=string.split,
TimeStamp=TimeStamp.TimeStamp, translate=string.translate
):
t=time()
ts=split(b2a(`TimeStamp(*gmtime(t)[:5]+(t%60,))`)[:-1],'=')[0]
return translate(ts, b64_trans)
Unfortunately, I don't know any C, and the TimeStamp function is only
available in C. I'm hoping someone can spare a few minutes to explain
how this function could be coded in python so I can understand it, and
produce a non-python function to return valid browser ids.
I hope that makes sense!
Thanks
Miles
More information about the Zope-Dev
mailing list