As I recall, identity consists of 3 tables plus some join tables between them:
users
groups
permissions

Visit tracking uses a single table which has 4 columns:
visit key
when created
when expires
user ID

Logging in adds a record to the visit table. Identity installs a cherrypy 
filter which on every server request, gets the visit key (if any) from the 
cookie and looks it up in the visit table. If the cookie has not expired yet, 
then that user is associated with the current request.

Do you want to keep the user permanently logged in? Did you try setting 
visit.timeout to a really high value?

Barry

----- Original Message ----
From: Yuen Ho Wong <[EMAIL PROTECTED]>
To: TurboGears <[email protected]>
Sent: Monday, December 3, 2007 10:59:41 AM
Subject: [TurboGears] Re: Persistent login



I read that thread too. Too bad nothing usable came out of it. If
someone can explain to me what and how the visit and identity
frameworks are doing behind the scenes, I'd at least have an idea
where to start.

Yuen


On Dec 3, 4:15 am, lilspikey <[EMAIL PROTECTED]> wrote:
> This is something I'd really like to be able to implement too, but
> just never got around to really having a go.
>
> Searching on this list reveals quite a few people are after this:
>
>
  http://groups.google.com/group/turbogears/search?hl=en&group=turbogea...
>
> I think it could be done by adding a new "identity_from_<blah>"
 method
> to the IdentityProvider class (from memory so that might not be the
> right names), which looks for a "remember me" cookie and then
> associates the current visit with the remembered user.
>
> This could probably be achieved with a bit of careful monkey
> patching.  As it's adding a single new method it shouldn't be too
> invasive.  I haven't tried it myself yet though...
>
> It would be nice to finally have a proper solution to this common
> request though.
>
> Anyone else got any thoughts?
>
> On Dec 3, 4:40 am, Yuen Ho Wong <[EMAIL PROTECTED]> wrote:
>
> > Hi Tgers,
>
> > I was just wondering how I should implement persistent logins in
 the
> > context of TG. Ideally I'd like to do something like this:
>
>
 >http://fishbowl.pastiche.org/2004/01/19/persistent_login_cookie_best_...
>
> > It would also help if someone can explain to me how the visit and
> > identity framework work together, I'm utterly confused by the
 source
> > code as I'm still quite new to Python the TG.
>
> > Thanks a lot
>
> > Yuen







      
____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to