2017 © Pedro Peláez
 

library haveibeenpwned

A plugin to check if your users passwords have been pwned by a known data breach via https://haveibeenpwned.com

image

kylemass/haveibeenpwned

A plugin to check if your users passwords have been pwned by a known data breach via https://haveibeenpwned.com

  • Wednesday, August 9, 2017
  • by KyleMassacre
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Have I been pwned

Introduction

A plugin to check if your users passwords have been pwned by a known data breach via https://haveibeenpwned.com, (*1)

Installation

Run: ```$xslt composer require kylemass/haveibeenpwned:dev-master, (*2)

Add the provider to your config file
```php
KyleMass\Hibp\Providers\HibpServiceProvider::class

Add the Facade, (*3)

'Hibp' => KyleMass\Hibp\Facades\Hibp::class

Next, publish the config file using:, (*4)

php artisan vendor:publish --provider="KyleMass\Hibp\Providers\HibpServiceProvider" --tag=config

To Use:

Inside your validation just add the: beenpwned validation rule.:, (*5)

Validator::make($data, [
    'name' => 'required|string|max:255',
    'email' => 'required|string|email|max:255|unique:users|beenpwned:false',
    'password' => 'required|string|min:6|confirmed|beenpwned',
]);

Please take note: that there is a boolean parameter. By default this checks for passwords. By leaving the parameter off or setting it to true it will check the password against the Have I been pwned API. If you set it to false, this will check their account login name or password., (*6)

Also note that by using the validation on an email and/or username, you potentially wont pass validation for the registering user. Only use this if this is what you truly desire., (*7)

TODO:

  1. Make it framework agnostic
  2. Add validating to a local storage of pwned accounts

The Versions

09/08 2017

dev-master

9999999-dev

A plugin to check if your users passwords have been pwned by a known data breach via https://haveibeenpwned.com

  Sources   Download

MIT

The Requires

 

passwords account haveibeenpwned data breach