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

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