staysafe/password-policy-builder

A verbose password policy builder

Maintainers

Package info

github.com/staysafe/password-policy-builder

pkg:composer/staysafe/password-policy-builder

Statistics

Installs: 69 927

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 1

1.0.0 2023-06-01 20:20 UTC

This package is auto-updated.

Last update: 2026-03-01 00:29:34 UTC


README

Latest Version on Packagist Software License Coverage Status Total Downloads

Install

Via Composer

$ composer require staysafe/password-policy-builder

Usage

        $jsonConstraints = file_get_contents(dirname(__DIR__) . '/fixtures/policy.json');
        $policy = new JsonPolicy($jsonConstraints);

        $passwordPolicyBuilder = new PasswordPolicyBuilder($policy);
        if ($passwordPolicyBuilder->isValid($password)) {   
            // password meets the Password Policy
        }

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Credits

License

The BSD 3-Clause License. Please see License File for more information.