NetEscapades.AspNetCore.Identity.Validators
A collection of ASP.NET Core Identity IPasswordValidators
Install / Use
/learn @andrewlock/NetEscapades.AspNetCore.Identity.ValidatorsREADME
NetEscapades.AspNetCore.Identity.Validators
<!--[](https://travis-ci.org/andrewlock/NetEscapades.AspNetCore.Identity.Validators)-->A collection of ASP.NET Core Identity IPasswordValidators for use with Microsoft.AspNetCore.Identity.EntityFrameworkCore.
Usage
Includes the following validators:
-
EmailAsPasswordValidator- Verify the user has not used their email as their password -
UsernameAsPasswordValidator- Verify the user has not used their email as their password -
InvalidPhraseValidator- Ensure the user hasn't used specific phrases, such as the url or domain of your website
You can add the validators to your project using the AddPasswordValidator<TValidator> method exposed by IdentityBuilder. Alternatively, use the extension methods on IdentityBuilder included in the package:
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders()
.AddEmailAsPasswordValidator<ApplicationUser>() // Add the email as password validator
.AddUsernameAsPasswordValidator<ApplicationUser>() // Add the username as password validator
.AddInvalidPhraseValidator<ApplicationUser>(new []{"MyDomainName.com"}); // Add the invalid phrase validator
NOTE This package currently support ASP.NET Core Identity 2.0 (.NET Standard 2.0) and .NET Core 3.0
Installing
Install using the NetEscapades.AspNetCore.Identity.Validators NuGet package:
PM> Install-Package NetEscapades.AspNetCore.Identity.Validators
or
dotnet add package NetEscapades.AspNetCore.Identity.Validators
Additional Resources
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
Languages
Security Score
Audited on Aug 24, 2023
