silinternational / idp-pw-api-passwordstore-multiple
此包已被废弃,不再维护。未建议替代包。
用于使用多个后端的IdP PW API密码存储组件。
1.0.2
2017-12-06 20:35 UTC
Requires
- php: >=7.0.0
- fillup/fake-bower-assets: ^2.0.9
- roave/security-advisories: dev-master
- silinternational/idp-pw-api-common: ^1.0
- yiisoft/yii2: ~2.0.0
Requires (Dev)
- behat/behat: ^3.3
- phpunit/phpunit: ^6.0
- silinternational/php-env: ^2.0
This package is auto-updated.
Last update: 2020-02-13 20:03:57 UTC
README
此仓库不再维护。它已被整合到 idp-pw-api 中。
idp-pw-api-passwordstore-multiple
用于使用多个后端的IdP PW API密码存储组件。
示例用法
use Sil\IdpPw\PasswordStore\Google\Google;
use Sil\IdpPw\PasswordStore\IdBroker\IdBroker;
use Sil\IdpPw\PasswordStore\Ldap\Ldap;
use Sil\IdpPw\PasswordStore\Multiple\Multiple;
// ...
$multiple = new Multiple([
'passwordStoresConfig' => [
[
'class' => IdBroker::class,
// ... properties needed by this password store...
],
[
'class' => Google::class,
// ... properties needed by this password store...
],
[
'class' => Ldap::class,
// ... properties needed by this password store...
],
],
]);
密码存储的顺序很重要
在 passwordStoresConfig
列表中放置的密码存储的第一个将被视为主密码存储。
当你调用此 Multiple
类的 set(...)
方法时,它将依次调用你定义的每个密码存储的 set(...)
方法,但只有第一个密码存储的返回值将返回给你。
当你调用此 Multiple
类的 getMeta(...)
方法时,它将只调用列表中第一个密码存储的 getMeta(...)
方法,并将响应返回给你。
特性
有关此密码存储特性的更多信息,请参阅 features/multiple.feature
文件。