PHPackages                             particleflux/password-manager-connection - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. particleflux/password-manager-connection

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

particleflux/password-manager-connection
========================================

Connect to an external password/secret manager

5.0.0(1y ago)0101MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

Since Apr 20Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/particleflux/password-manager-connection)[ Packagist](https://packagist.org/packages/particleflux/password-manager-connection)[ RSS](/packages/particleflux-password-manager-connection/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (0)

password-manager-connection
===========================

[](#password-manager-connection)

[![Packagist Version](https://camo.githubusercontent.com/73d1b061e614b07cd1fa4f523b880f02cfec5d41f3ceb71e02749a1a6f303ec6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061727469636c65666c75782f70617373776f72642d6d616e616765722d636f6e6e656374696f6e2e737667)](https://packagist.org/packages/particleflux/password-manager-connection)[![Packagist PHP Version](https://camo.githubusercontent.com/0808a30095e7675dd07a7e87535348bfbf893d3aa93e2ca2ddebf68bc283532d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f7061727469636c65666c75782f70617373776f72642d6d616e616765722d636f6e6e656374696f6e2f706870)](https://camo.githubusercontent.com/0808a30095e7675dd07a7e87535348bfbf893d3aa93e2ca2ddebf68bc283532d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f7061727469636c65666c75782f70617373776f72642d6d616e616765722d636f6e6e656374696f6e2f706870)[![CircleCI](https://camo.githubusercontent.com/a0037160422607c872fec64a078cb5d87051dff42528de24398685882a8e1459/68747470733a2f2f636972636c6563692e636f6d2f67682f7061727469636c65666c75782f70617373776f72642d6d616e616765722d636f6e6e656374696f6e2e7376673f7374796c653d736869656c64)](https://circleci.com/gh/particleflux/password-manager-connection)[![Maintainability](https://camo.githubusercontent.com/163ad364d58198ea3d7f9aec1e3aa82780523983e60de3a7bd1aac6c5f669f6f/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f63313963613837343930333764623130663862662f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/particleflux/password-manager-connection/maintainability)[![Test Coverage](https://camo.githubusercontent.com/6f6aa079bb69023a65df62da95a809a10f3208fd275aef45632347d5a743e2ab/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f63313963613837343930333764623130663862662f746573745f636f766572616765)](https://codeclimate.com/github/particleflux/password-manager-connection/test_coverage)

Connect your PHP app to an external password manager.

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

[](#installation)

```
composer require particleflux/password-manager-connection

```

Requirements
------------

[](#requirements)

- minimum PHP 8.1

Usage
-----

[](#usage)

```
use particleflux\PMConnection\PassConnection;

// initialize the connection client
$connection = new PassConnection();

// get the password for the account 'facebook'
$password = $connection->getPassword('facebook');

// get the username for the account 'facebook'
$username = $connection->getUser('facebook');

// get a custom attribute for an account
$email = $connection->getAttribute('facebook', 'email');
```

### PassConnection

[](#passconnection)

*PassConnection* is a specific implementation to connect with [pass](https://www.passwordstore.org/).

```
$connection = new PassConnection([
    'prefix'        => 'social-media/',
    'userAttribute' => 'username',
]);
```

#### Configuration options

[](#configuration-options)

##### prefix

[](#prefix)

A prefix applied to the pass entry name.

By default, this is empty, meaning that the *account* given to the connection methods is the complete account name. When having more complex or bigger password databases though, it is common to group them by *subfolders*. These subfolders can be auto-appended by using the prefix parameter.

For example, when setting *prefix* to `social-media/`, the call to `getPassword('facebook')` will actually get the password entry for `social-media/facebook`.

##### userAttribute

[](#userattribute)

The attribute to get the username.

To have additional data besides the password for an entry, it is common to have specific attribute name prefixes. This options configures the attribute name used for getting the username.

Taking this pass entry for example:

```
my-secret-password
username: my-username

```

This example, with the *userAttribute* of `username`, will return *my-username*in a call to `getUser()`.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance63

Regular maintenance activity

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 96.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~409 days

Recently: every ~442 days

Total

6

Last Release

531d ago

Major Versions

1.0.1 → 2.0.02020-12-02

2.0.0 → 3.0.02021-10-29

3.0.0 → 4.0.02023-06-09

4.0.0 → 5.0.02024-11-25

PHP version history (5 changes)1.0.0PHP &gt;=7.1.0

2.0.0PHP ~7.2 || ~8.0

3.0.0PHP ^7.4 || ^8.0

4.0.0PHP ^8.0

5.0.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5778c9deedffbef8b0e713733fa0d0b9c08069c5e969e2ff5fe3112fe4695bad?d=identicon)[particleflux](/maintainers/particleflux)

---

Top Contributors

[![particleflux](https://avatars.githubusercontent.com/u/3686454?v=4)](https://github.com/particleflux "particleflux (62 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")

---

Tags

composer-packagecredentialspassword-managerphpphp-library

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/particleflux-password-manager-connection/health.svg)

```
[![Health](https://phpackages.com/badges/particleflux-password-manager-connection/health.svg)](https://phpackages.com/packages/particleflux-password-manager-connection)
```

###  Alternatives

[treeware/plant

13355.9k6](/packages/treeware-plant)[aschmelyun/size

Simple PHP helper to convert bytes to different sizes

471.2k](/packages/aschmelyun-size)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
