Download the PHP package despark/password-policy-bundle without Composer
On this page you can find all versions of the php package despark/password-policy-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download despark/password-policy-bundle
More information about despark/password-policy-bundle
Files in despark/password-policy-bundle
Package password-policy-bundle
Short Description Password policy enforcements
License MIT
Informations about the package password-policy-bundle
Password Policy Bundle
Installation
Configuration
-
Implement
Despark\PasswordPolicyBundle\Model\HasPasswordPolicyInterface
in the entities that you want to support password policies. -
Implement
Despark\PasswordPolicyBundle\Model\PasswordHistoryInterface
in a new entity that will hold the password history records. -
Configure how Password policy will behave on every entity. Configuration example is here
- You need to add
@PasswordPolicy()
validation rules to your$plainPassword
field
Configuration example:
Expiry
Expiry works by checking last password change on every request made to the app, excluding those configured in the application
Good to know
The library uses doctrine lifecycle events to create password history and set last password change on the target entities. In order for this to happen we use the onFlush event and we are recalculating the history change set inside it. You must be aware of that as any entity changes after the recalculation will not be persisted to the database.
All versions of password-policy-bundle with dependencies
symfony/framework-bundle Version ^4.1
symfony/validator Version ^4.1
doctrine/collections Version ^1.5
doctrine/orm Version ^2.6
nesbot/carbon Version ~1.18