Download the PHP package beliven-it/laravel-password-history without Composer
On this page you can find all versions of the php package beliven-it/laravel-password-history. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download beliven-it/laravel-password-history
More information about beliven-it/laravel-password-history
Files in beliven-it/laravel-password-history
Package laravel-password-history
Short Description A small package for implements a password history
License MIT
Homepage https://github.com/beliven-it/laravel-password-history
Informations about the package laravel-password-history
Laravel Password History
[![Latest Version on Packagist](https://img.shields.io/packagist/v/beliven-it/laravel-password-history.svg?style=for-the-badge&labelColor=2a2c2e&color=0fbccd)](https://packagist.org/packages/beliven-it/laravel-password-history) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/beliven-it/laravel-password-history/run-tests.yml?branch=main&label=tests&style=for-the-badge&labelColor=2a2c2e&color=0fbccd)](https://github.com/beliven-it/laravel-password-history/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/beliven-it/laravel-password-history/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=for-the-badge&labelColor=2a2c2e&color=0fbccd)](https://github.com/beliven-it/laravel-password-history/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/beliven-it/laravel-password-history.svg?style=for-the-badge&labelColor=2a2c2e&color=0fbccd)](https://packagist.org/packages/beliven-it/laravel-password-history)
This package allows you to keep track of the last passwords used by a user.
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
This is the contents of the published config file:
The only value configurable is the depth of the password history. This value is the number of passwords that will be stored in the history. When a user tries to set a password that is in the history, the validation will fail.
Usage
The library allow to apply a trait in your own models.
Let's try to use in the User
model:
Now, when you need to create / update a user password you can use the following procedure:
You can also use a rule in your request validation:
Warning!!:
For password checking is important to provide the plain text password and NOT the hashed password. otherwise an exception will be thrown. Make sure to check your code before using this package.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Fabrizio Gortani
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-password-history with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0