c# - ASP.NET Core Identity 的密码策略在哪里?
问题描述
Individual User Accounts
我创建了带有身份验证选项的 ASP.NET Core Web 应用程序(目标 .NET Core 3.1)MVC 。
当我运行程序时,我注意到帐户Register
功能启用了密码策略。我的问题是密码策略代码在哪里?
我没有注意到任何密码策略配置Startup.cs
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(
Configuration.GetConnectionString("DefaultConnection")));
services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
.AddEntityFrameworkStores<ApplicationDbContext>();
services.AddControllersWithViews();
services.AddRazorPages();
}
解决方案
推荐阅读
- linkedin - 什么 API 方法可用于获取所有最新的 LinkedIn 帖子?
- javascript - 无法读取属性“addEventListener”
- netflix-eureka - 遵循 Eureka API 文档注册非 Java 应用程序 - 问题
- javascript - 如何进一步破坏所有以父类开头的变量集?
- bixby - Bixby 可以针对不同的设备有不同的视图吗?
- mysql - ORDER BY 条款帮助
- javascript - 组件之间的数据通信问题
- vbscript - 使用 VBScript 关闭 Word 会留下临时 Word 文档
- javascript - 在 IE v11 中下载并打开 PDF
- loops - 在 last , (comma) country 之后获取字符