如何在gmail中为同一个浏览器中的两个用户创建登录 [英] how to create login for two user in same browser just as the gmail

查看:62
本文介绍了如何在gmail中为同一个浏览器中的两个用户创建登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在同一个浏览器中为两个用户或更多用户创建登录,就像gmail添加一个/ c按钮一样

解决方案

我在SOF上面找到了一个。检查一下。



引用:

这都是关于不将1个会话与1关联用户。



让我简单解释一下。



通常你在ASP中有一个服务器会话。 NET存储一些用户值,可以自定义或放置这样的有用数据:



HttpContext.Current.Session [isAuthenticated] = true;

怎么样:



HttpContext.Current.Session [1182] [isAuthenticated] = true;

...其中1182只是一个唯一的用户标识符。



只需将值存储在某个集合中的服务器会话中,其密钥是经过身份验证的身份的唯一用户标识符,因此允许参数化的唯一用户标识符访问会话的值。



这是一个更成熟和复杂的实际解决方案的缩写,但它暗示了如何你会处理这种情况。





有关详情,请查看同一网站/ webapp同时登录多个会话或多个用户 [ ^ ]。



我希望这会对你有所帮助。







添加链接文字以反映文章/质量保证标题。

< I> [/编辑] 的


how to create login for two user or more in same browser just as the gmail add a/c button

解决方案

I have found below one on SOF. Check that.

Quote:

It's all about not associating 1 session with 1 user.

Let me briefly explain that.

Usually you've a server session in ASP.NET storing some user values that may customize or place useful data like this:

HttpContext.Current.Session["isAuthenticated"] = true;
What about:

HttpContext.Current.Session["1182"]["isAuthenticated"] = true;
...where "1182" is just an unique user identifier.

Just store values in server session in some collection where its key is the unique user identifier of authenticated identity, so this allows a parameterized-by-unique-user-identifier access to session's values.

It's an abbreviation of a more mature and complex actual solution, but it's a hint of how you'd handle such situation.



For more info check Multiple Session or Multiple User login in same website/webapp at same time[^].

I hope this will help to you.


[Edit member="Tadit"]
Link text added to reflect the Article/QA title.
[/Edit]


这篇关于如何在gmail中为同一个浏览器中的两个用户创建登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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