Skip to content

Stanford-password-policy-dotnet is a password validator library for ASP.NET Core.

License

Notifications You must be signed in to change notification settings

dim5/stanford-password-policy-dotnet

Repository files navigation

Stanford-password-policy-dotnet Codacy Badge Build status

Stanford-password-policy-dotnet is a password validator library for ASP.NET Core.

What is it

The Stanford password policy is a dynamic password policy that encourages the use of easy to remember, yet secure passphrases instead of hard to remember passwords.

Installation

Using the dotnet-cli

dotnet add package StanfordPasswordPolicy

or with the nuget package manager console:

Install-Package StanfordPasswordPolicy

Usage

services.AddIdentity<AppUser, IdentityRole>(opt =>
        {
            // If you don't want Identity's defaults to interfere with your new policy
            opt.Password = StanfordPasswordValidatorBase.NoDefaultPasswordOptions;
        })
        .AddPasswordValidator<StanfordPasswordValidator<AppUser>>();

You can also check out SampleApp for a more complete example.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache License 2.0

Obligatory XKCD

XKCD#936

About

Stanford-password-policy-dotnet is a password validator library for ASP.NET Core.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages