我已经编写了C#Web API应用程序的代码,并且某些调用要求用户登录。
这是我当前用于登录用户的代码:
[InitializeSimpleMembership]
public bool TestLogon(string userName, string password, bool rememberMe)
{
return WebSecurity.Login(userName, password, persistCookie: rememberMe);
}
我的问题是:上述通话的安全性如何?上面的代码对于商业应用而言是否足够安全,如果不能,那么如何对其进行改进?我需要实现任何种类的AntiForgeryToken吗?
提前致谢
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句