PHPackages                             divineomega/symfony-password-exposed-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. divineomega/symfony-password-exposed-bundle

Abandoned → [jord-jd/symfony-password-exposed-bundle](/?search=jord-jd%2Fsymfony-password-exposed-bundle)Symfony-bundle[Security](/categories/security)

divineomega/symfony-password-exposed-bundle
===========================================

Symfony bundle that checks if a password has been exposed in a data breach

v1.0.1(6mo ago)1204LGPL-3.0-onlyPHPPHP ^7.4 || ^8.0

Since Jun 24Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Jord-JD/symfony-password-exposed-bundle)[ Packagist](https://packagist.org/packages/divineomega/symfony-password-exposed-bundle)[ GitHub Sponsors](https://github.com/DivineOmega)[ RSS](/packages/divineomega-symfony-password-exposed-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (9)Versions (3)Used By (0)

🔒 Symfony Password Exposed Bundle
=================================

[](#-symfony-password-exposed-bundle)

This package provides a Symfony bundle that checks if a password has been exposed in a data breach. It uses the haveibeenpwned.com passwords API via the [`jord-jd/password_exposed`](https://github.com/Jord-JD/password_exposed) library.

It supports PHP 7.4 through current releases and Symfony 4.4 through 8.

Installation
------------

[](#installation)

The `password_exposed` symfony bundle can be easily installed using Composer. Just run the following command from the root of your project.

```
composer require jord-jd/symfony-password-exposed-bundle

```

If you have never used the Composer dependency manager before, head to the [Composer website](https://getcomposer.org/) for more information on how to get started.

Configuration
-------------

[](#configuration)

You can adjust this bundle with some simple configs

```
password_exposed:
    enable: true # Optional; for example, disable this in the dev environment.
    http_client: null # Optional service ID for a custom PSR-18 client.
    cache: cache.app # Optional service ID for a custom PSR-6 cache.
    cache_lifetime: 2592000 # Optional cache lifetime in seconds.
    request_factory: null # Optional service ID for a custom PSR-17 request factory.
    uri_factory: null # Optional service ID for a custom PSR-17 URI factory.
```

All keys are optional. The values above are the defaults.

Usage
-----

[](#usage)

### In a controller

[](#in-a-controller)

To check if a password has been exposed in a data breach, just pass it to the `isExposed` method.

Here is a basic usage example for a controller:

```
