我想使用WebSecurity+SimpleMembership,但需要实现通过自定义/替代身份验证方法(可选)登录用户的能力。
WebSecurity.Login只有一个方法签名,需要用户名和密码。我想跳过密码检查,例如:
if (MyCustomAuthenticationMethod.Authenticate(username, customData)) {
WebSecurity.Login(username); // Login without password check, method doesn't exist though
}
假设自定义认证方法是可能的,因为OAuthWebSecurity存在,但我不确定如何实现自己的方法。