Download the PHP package beliven-it/laravel-password-expiry without Composer
On this page you can find all versions of the php package beliven-it/laravel-password-expiry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download beliven-it/laravel-password-expiry
More information about beliven-it/laravel-password-expiry
Files in beliven-it/laravel-password-expiry
Package laravel-password-expiry
Short Description A simple and customizable package that adds password expiration functionality to your Laravel applications, enhancing user security with regular password rotation
License MIT
Homepage https://github.com/beliven-it/laravel-password-expiry
Informations about the package laravel-password-expiry
Laravel Password Expiry
[](https://packagist.org/packages/beliven-it/laravel-password-expiry) [](https://github.com/beliven-it/laravel-password-expiry/actions?query=workflow%3Arun-tests+branch%3Amain) [](https://github.com/beliven-it/laravel-password-expiry/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [](https://packagist.org/packages/beliven-it/laravel-password-expiry)
A simple and customizable package that adds password expiration functionality to your Laravel applications, enhancing user security with regular password rotation
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 days_to_expire
key is the number of days after which the password will expire.
The days_to_notify_expiration
key is the number of days before the password expires that the user will be notified.
NOTE: The package not provide any notification. You can create your own notification and use the
Beliven\PasswordExpiry\Events\PasswordExpired
andBeliven\PasswordExpiry\Events\PasswordExpiring
events.
Usage
Trait
The library allow to apply a trait in your own models.
Let's try to use in the User
model:
Now, when you create / update a user password, a new record will be created in the model_password_changes
table.
You can also obtain the password expiration date using the password_expires_at
attribute.
The trait also provides a method to attempt to clear the password if expired.
If the user doesn't have a password expired nothing will happen.
Commands
The package provides a command to check for expiring and expired passwords.
This command is useful to be scheduled to run daily.
Events
The package provides the following events:
Beliven\PasswordExpiry\Events\PasswordExpired
: This event is fired when a password is expired.Beliven\PasswordExpiry\Events\PasswordExpiring
: This event is fired when a password is expiring.
These events will be triggered when the password-expiry:check
command is executed or via the facade:
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-expiry with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0|^11.0|^12.0