【发布时间】:2013-08-09 22:19:50
【问题描述】:
是否可以自定义 SimpleMembershipProvider 以不仅仅需要用户名和密码来登录?
例如,假设我想要 4 条信息:
Login, Password, Abc, Xyz
(Abc and Xyz are just generic placeholders, for now)
Suppose your login is:
john/mypassword555/1/1 (authenticated) -> pagex
john/mypassword999/1/2 (authenticated) -> pagey
bob/mypassword333/1/1 (authenticated) -> pagex
bob/mypassword333/1/2 (authenticated) ->pagey
bob/mypassword333/1/3 (authenticated) -> pagez
只有 john/mypassword 或 bob/mypassword333 是不够的。
我希望能够为所有登录或不同的密码使用相同的密码,但在 Request.IsAuthenticated 为 true 之前仍需要所有 4 个字段。
【问题讨论】:
标签: c# asp.net security asp.net-mvc-4 simplemembership