Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Identityserver4 登录尝试失败_Identityserver4 - Fatal编程技术网

Identityserver4 登录尝试失败

Identityserver4 登录尝试失败,identityserver4,Identityserver4,Identity Server 4是否支持在多次登录尝试失败后暂停帐户 我知道有更好的方法来处理失败的登录尝试,比如在用户最终成功登录时要求用户提供更多形式的身份证明。但是,扩展Identity Server 4以在x次失败登录后按IP地址等暂停帐户是否足够简单?默认情况下,Identity Server不支持用户锁定。 您可以设置ASP.NET标识来处理此问题。事实上,IdentityServer有一个与ASP.NET Identity集成的示例。 您可以在ConfigureServices方

Identity Server 4是否支持在多次登录尝试失败后暂停帐户


我知道有更好的方法来处理失败的登录尝试,比如在用户最终成功登录时要求用户提供更多形式的身份证明。但是,扩展Identity Server 4以在x次失败登录后按IP地址等暂停帐户是否足够简单?

默认情况下,Identity Server不支持用户锁定。 您可以设置ASP.NET标识来处理此问题。事实上,IdentityServer有一个与ASP.NET Identity集成的示例。 您可以在ConfigureServices方法的标识选项中设置用户锁定

services.AddIdentity<ApplicationUser, IdentityRole>(options =>
{
    options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromDays(1);
    options.Lockout.MaxFailedAccessAttempts = 20;
});

services.AddIdentity

听起来不错,我会进一步研究。这似乎是一个非常合适的解决方案,我想知道为什么有人否决了它。在另一个答案中有更多细节,我需要让一切正常运行