Reputation: 1167
Is it possible to query current active sessions with couchdb?
The server is able to keep track of sessions based on the timeout value so how would I figure out what users have an active session?
Upvotes: 2
Views: 225
Reputation: 4679
CouchDB doesn't knows anything about active sessions. These "sessions" are actually based on HTTP Cookie, which holds username, timestamp and signature hash. When CouchDB handling the request, it decodes cookie's AuthSession value and verifies that:
If all these conditions are ok: request is accepted for further processing. If Timestamp is closer to expiration border, CouchDB updates the cookie to make the "session" last longer.
For this scheme there is no reason and need to maintain internal list of active sessions.
Upvotes: 4