I'm using Restful Authentication plugin to provide credentials to users
to my service.
I'd like to be able to list which users are logged into the system. What
would be the best approach.
At least in the sessions controller I could add a flag for each user
when they come and go but that means DB action and I'm not sure if
that's the proper way.
I've been checking more about sessions and all that. I haven't checked
every single detail of all possible ways but I think that cokies can be
used, activeRecordStore, etc.
As said I'm using Restful authentication and that goes with cockies. Ok
with me so far.
I've added a column to my users to store their status. I update it when
they come and go. But of course users don't logout when the close their
browsers. So I would register some actions when users browse the site,
i.e. record the timestamps.
After doing that I would use a script runner to see if the last activity
was for example 30 minutes ago, if so then I would update their status
to logged out.
In the end I actually decided to use active record store and it is going
pretty well. But I have some questions about and I'll start a new topic
about sessions cleanup and avoiding duplication.