查看活动的用户会话 [英] View active user sessions

查看:121
本文介绍了查看活动的用户会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以查看Couchdb服务器上的活动用户会话列表?

Is it possible to view a list of active user sessions on a couchdb server?

沙发文档( http://docs.couchdb.org/en/2.0.0/api/index .html ).

我也看不到与在Futon和Fauxton UI中所需要的相似的东西.

I also can see nothing similar to what I require in Futon nor Fauxton UIs.

推荐答案

是否可以查看Couchdb服务器上的活动用户会话列表?

Is it possible to view a list of active user sessions on a couchdb server?

简短的回答:否

长答案:真的没有CouchDB中的用户会话.

Long answer: There's no such thing, really, as user sessions in CouchDB.

CouchDB的用户会话" cookie只是用户密码盐,服务器机密以及cookie的创建时间(以便它可以知道其何时过期)的HMAC.

CouchDB's "user session" cookies are just an HMAC of the user's password salt, the server secret, and the time the cookie was created (so it can tell when it expires).

这意味着活动会话"是任何包含由有效用户盐,有效用户cookie以及过去少于N分钟(其中N是过期时间)组成的有效HMAC的cookie ).

This means that an "active session" is any cookie that contains a valid HMAC composed from a valid user salt, the valid user cookie, and any timestamp that is less than N minutes in the past (where N is the expiration time).

这些会话甚至不必在CouchDB服务器上创建,因此即使记录身份验证请求也不够.在某些情况下,通常的做法是在CouchDB外部的应用程序中创建这些cookie.

These sessions don't even have to be created on the CouchDB server, so even logging auth requests is not sufficient. It's a common practice in some situations to create these cookies in an app external to CouchDB.

作为后续问题:

您为什么对列出活动会话感兴趣?也许有另一种方法可以实现您的目标.

Why are you interested in listing active sessions? Maybe there's an alternative approach to accomplish whatever you're aiming for.

这篇关于查看活动的用户会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆