particleflux/password-manager-connection
Composer 安装命令:
composer require particleflux/password-manager-connection
包简介
Connect to an external password/secret manager
README 文档
README
Connect your PHP app to an external password manager.
Installation
composer require particleflux/password-manager-connection
Requirements
- minimum PHP 8.1
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 is a specific implementation to connect with pass.
$connection = new PassConnection([ 'prefix' => 'social-media/', 'userAttribute' => 'username', ]);
Configuration options
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
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().
particleflux/password-manager-connection 适用场景与选型建议
particleflux/password-manager-connection 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 04 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 particleflux/password-manager-connection 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 particleflux/password-manager-connection 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-20