All Projects â†’ langleyfoxall â†’ Laravel Nist Password Rules

langleyfoxall / Laravel Nist Password Rules

Licence: lgpl-3.0
🔒 Laravel validation rules that follow the password related recommendations found in NIST Special Publication 800-63B section 5.

Projects that are alternatives of or similar to Laravel Nist Password Rules

Pwned Passwords Django
Utilities for working with the Pwned Passwords database from Django.
Stars: ✭ 71 (-54.78%)
Mutual labels:  passwords, password-strength
password-list
Password lists with top passwords to optimize bruteforce attacks
Stars: ✭ 174 (+10.83%)
Mutual labels:  password-strength, passwords
Dumb Passwords
Don't let your user be a victim of their own action
Stars: ✭ 77 (-50.96%)
Mutual labels:  passwords, password-strength
PwnedPasswords
PwnedPasswords as a Service
Stars: ✭ 24 (-84.71%)
Mutual labels:  password-strength, passwords
Pw Pwnage Cfworker
Deploy a Cloudflare Worker to sanely score users' new passwords with zxcvbn AND check for matches against haveibeenpwned's 7.8+ billion breached accounts
Stars: ✭ 125 (-20.38%)
Mutual labels:  passwords, password-strength
Simple Qrcode
An easy-to-use PHP QrCode generator with first-party support for Laravel.
Stars: ✭ 1,923 (+1124.84%)
Mutual labels:  laravel-package
Laravel Db Profiler
Database Profiler for Laravel Web and Console Applications.
Stars: ✭ 141 (-10.19%)
Mutual labels:  laravel-package
Laravel Paddle
Paddle.com API integration for Laravel with support for webhooks/events
Stars: ✭ 132 (-15.92%)
Mutual labels:  laravel-package
Lockbox Extension
Experimental Firefox extension for login management experiences, not being actively developed
Stars: ✭ 130 (-17.2%)
Mutual labels:  passwords
Netpwn
Tool made to automate tasks of pentesting.
Stars: ✭ 152 (-3.18%)
Mutual labels:  password-strength
Ldap Passwd Webui
Very simple web interface for changing password stored in LDAP or Active Directory (Samba 4 AD).
Stars: ✭ 150 (-4.46%)
Mutual labels:  passwords
Laravel Api Explorer
API explorer for laravel applications
Stars: ✭ 138 (-12.1%)
Mutual labels:  laravel-package
Passwords
A simple, yet feature rich password manager for Nextcloud
Stars: ✭ 134 (-14.65%)
Mutual labels:  passwords
Laravel Themer
Multi theme support for Laravel application
Stars: ✭ 142 (-9.55%)
Mutual labels:  laravel-package
Laravel Emojione
Laravel package to make it easy to use the gorgeous emojis from EmojiOne
Stars: ✭ 133 (-15.29%)
Mutual labels:  laravel-package
Laravelresources
Speed Up package development for Laravel Apps with API's
Stars: ✭ 152 (-3.18%)
Mutual labels:  laravel-package
Eloquent Tree
Eloquent Tree is a tree model for Laravel Eloquent ORM.
Stars: ✭ 131 (-16.56%)
Mutual labels:  laravel-package
Laravel Easypanel
A beautiful and flexible admin panel creator based on Livewire for Laravel
Stars: ✭ 135 (-14.01%)
Mutual labels:  laravel-package
Servermonitor
💓 Laravel package to periodically monitor the health of your server and application.
Stars: ✭ 148 (-5.73%)
Mutual labels:  laravel-package
Laravel Deletable
👾 Gracefully restrict deletion of Laravel Eloquent models
Stars: ✭ 137 (-12.74%)
Mutual labels:  laravel-package

🔒 Laravel NIST Password Rules

Build Status Coverage Status StyleCI Packagist

This package provides Laravel validation rules that follow the password related recommendations found in NIST Special Publication 800-63B section 5.

Laravel NIST Password Rules implements the following recommendations.

Recommendation Implementation
[...] at least 8 characters in length A standard validation rule in all rule sets to validate against this minimum length of 8 characters.
Passwords obtained from previous breach corpuses The BreachedPasswords rule securely checks the password against previous 3rd party data breaches, using the Have I Been Pwned - Pwned Passwords API.
Dictionary words The DictionaryWords rule checks the password against a list of over 102k dictionary words.
Context-specific words, such as the name of the service, the username The ContextSpecificWords rule checks the password does not contain the provided username, and any words defined the configured app name or app URL.
Context-specific words, [...] and derivatives thereof The DerivativesOfContextSpecificWords rule checks the password is not too similar to the provided username, and any words defined the configured app name or app URL.
Repetitive or sequential characters (e.g. ‘aaaaaa’, ‘1234abcd’) The RepetitiveCharacters and SequentialCharacters rules checks if the password consists of only repetitive or sequential characters.

It also provides methods to return validation rules arrays for various scenarios, such as register, login, and password changes. These arrays can be passed directly into the Laravel validator.

Installation

Laravel NIST Password Rules can be easily installed using Composer. Just run the following command from the root of your project.

composer require langleyfoxall/laravel-nist-password-rules

If you have never used the Composer dependency manager before, head to the Composer website for more information on how to get started.

Optionally, you may publish the package's translation files with the following Artisan command.

php artisan vendor:publish --provider="LangleyFoxall\LaravelNISTPasswordRules\ServiceProvider"

Usage

To use the Laravel NIST Password Rules in your project, first use the PasswordRules class, then call the appropriate static methods to return an array of appropriate validation rules. There are methods available for the following scenerios.

  • Register
  • Change password, with old password
  • Change password, without old password
  • Optionally change password, with old password
  • Optionally change password, without old password
  • Login

See the code below for example usage syntax.

use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules;

// Register
$this->validate($request, [
    'email' => 'required',
    'password' => PasswordRules::register($request->email),
]);

// Register, without requiring password confirmation
$this->validate($request, [
    'email' => 'required',
    'password' => PasswordRules::register($request->email, false),
]);

// Change password, with old password
$this->validate($request, [
    'old_password' => 'required',
    'password' => PasswordRules::changePassword($request->email, 'old_password'),
]);

// Change password, without old password
$this->validate($request, [
    'password' => PasswordRules::changePassword($request->email),
]);

// Optionally change password, with old password
$this->validate($request, [
    'old_password' => 'required',
    'password' => PasswordRules::optionallyChangePassword($request->email, 'old_password'),
]);

// Optionally change password, without old password
$this->validate($request, [
    'password' => PasswordRules::optionallyChangePassword($request->email),
]);

// Login
$this->validate($request, [
    'email' => 'required',
    'password' => PasswordRules::login(),
]);

The optionallyChangePassword method supplies validation rules that are appropriate for forms in which the password can be optionally changed if filled in.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].