silinternational / idp-pw-api-personnel-id-broker
This package is abandoned and no longer maintained.
No replacement package was suggested.
IdP Password Management personnel component for ID Broker
2.0.0
2018-07-30 20:17 UTC
Requires
- php: >=7.0
- fillup/fake-bower-assets: *
- silinternational/idp-id-broker-php-client: ^2.2.0
- silinternational/idp-pw-api-common: ^1.0
- yiisoft/yii2: ~2.0.15
Requires (Dev)
- phpunit/phpunit: 6.2.*
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2021-08-07 22:06:27 UTC
README
This repository is no longer maintained. It has been incorporated into idp-pw-api.
idp-pw-api-personnel-idbroker
IdP Password Management personnel component for ID Broker
Summary
This project has one class (IdBroker) with three public methods which use the ID Broker php client to get person data from the ID Broker service. Each of these functions attaches that data to a PersonnelUser instance which it then returns.
The public methods are ...
- findByEmployeeId($employeeId) // Preferred method
- findByUsername($username)
- findByEmail($email)
Configuration
This code is loaded in as a Yii2 Component in the main config file. Here is an example:
'components' => [ 'personnel' => [ 'class' => 'Sil\IdpPw\Common\Personnel\IdBroker\IdBroker', 'baseUrl' => Env::requireEnv('ID_BROKER_BASE_URI'), 'accessToken' => Env::requireEnv('ID_BROKER_ACCESS_TOKEN'), 'assertValidBrokerIp' => true, 'validIpRanges' => ['10.0.01/16','127.0.0.1/32'], ], ]
A more concise example:
'components' => [ 'personnel' => ArrayHelper::merge( ['class' => 'Sil\IdpPw\Common\Personnel\IdBroker\IdBroker'], Env::getArrayFromPrefix('ID_BROKER_') ), ]
Run the Unit Tests
$ docker-compose run --rm test