简体   繁体   English

asp.net mvc登录用户,使用formsauthentication cookieless

[英]asp.net mvc login user using formsauthentication cookieless

I'm writing a custom membership provider that uses LINQ to manage my users. 我正在编写一个使用LINQ来管理我的用户的自定义成员资格提供程序。 I'm also creating my own tables to manage a user. 我还创建了自己的表来管理用户。 How would I login a user using the FormsAuthentication object if I want auth to be cookieless? 如果我希望auth是无cookie的,如何使用FormsAuthentication对象登录用户?

You really want to avoid cookieless session persistence at all costs. 您真的想不惜一切代价避免无cookie会话持久性。 It means persistence via the URL which is very vulnerable to session hijacking. 这意味着通过URL的持久性很容易受到会话劫持的影响。 Take a look at the example in OWASP Top 10 for .NET developers part 3: Broken authentication and session management . 看一看OWASP Top for .NET开发人员第10部分中的示例:身份验证和会话管理中断

Are you really confident you have clients authenticating who don't support cookies and you willing to compromise security for these individuals? 您是否真的有信心让不支持Cookie的客户进行身份验证,并且愿意为这些人的安全性做出妥协?

In regular asp.net IIS manages that for you by inserting the session id in the URL. 在常规的asp.net中,IIS通过在URL中插入会话ID来为您进行管理。

By the way this is not the safest approach, as the session can be stolen. 顺便说一句,这不是最安全的方法,因为会话可能被盗。

http://msdn.microsoft.com/en-us/library/aa479314.aspx http://msdn.microsoft.com/en-us/library/aa479314.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM