Password v1.1.1 Password.Policy.CommonPasswords View Source

Check whether a password figures in the list of most common passwords by Mark Burnett (xato.net).

To use, simply add it to the list of policies:

use Password, [
  {Password.Policy.CommonPasswords}
]
iex> MyApp.Password.validate("password")
{:error, [Password.Policy.CommonPasswords]}

iex> MyApp.Password.validate("very unusual password")
:ok

List contains only the top passwords with minimum length of 8 characters, so anything shorter won’t produce matches and will pass.