PHPackages                             gids-open-standaarden/open-pgo-medmij-implementatie-bouwstenen-php - 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. [API Development](/categories/api)
4. /
5. gids-open-standaarden/open-pgo-medmij-implementatie-bouwstenen-php

AbandonedArchivedLibrary[API Development](/categories/api)

gids-open-standaarden/open-pgo-medmij-implementatie-bouwstenen-php
==================================================================

PHP implementation of the MedMij OpenPGO building blocks.

0.2.0(7y ago)05AGPL-3.0-onlyPHPPHP &gt;=7.0

Since Oct 18Pushed 5y ago5 watchersCompare

[ Source](https://github.com/GIDSOpenStandaarden/OpenPGO-Medmij-ImplementatieBouwstenen-PHP)[ Packagist](https://packagist.org/packages/gids-open-standaarden/open-pgo-medmij-implementatie-bouwstenen-php)[ RSS](/packages/gids-open-standaarden-open-pgo-medmij-implementatie-bouwstenen-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

This repository has been archived
=================================

[](#this-repository-has-been-archived)

Dear reader, The decision has been made to archive this repository. The reason is that the OpenPGO-Medmij-ImplementatieBouwstenen-PHP isn’t being used and has deferred maintenance including security vulnerabilities. If you desire to use this adapter, please contact GIDS: .

[![Build Status](https://camo.githubusercontent.com/4a199ba1508b64fcdb201782641cc77a8dd313e57249d67d0c8a2734e426c4c0/68747470733a2f2f7472617669732d63692e6f72672f476964734f70656e5374616e6461617264656e2f4f70656e50474f2d4d65646d696a2d496d706c656d656e7461746965426f75777374656e656e2d5048502e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/GidsOpenStandaarden/OpenPGO-Medmij-ImplementatieBouwstenen-PHP)

gids-open-standaarden/open-pgo-medmij-implementatie-bouwstenen-php
==================================================================

[](#gids-open-standaardenopen-pgo-medmij-implementatie-bouwstenen-php)

PHP implementation of the MedMij OpenPGO building blocks.

Version Guidance
----------------

[](#version-guidance)

This library follows [Semantic Versioning](https://semver.org/). The versions of the Afspraken set are mapped to the versions of the library as follows:

Version AfsprakensetStatusVersion library[Afsprakenset release 1.1](https://afsprakenstelsel.medmij.nl/display/PUBLIC/Afsprakenset+release+1.1)Latest0.2.\*Afsprakenset release 1.0EOL0.1.\*Installation
============

[](#installation)

The OpenPGO PHP adapter can be installed using [Composer](https://getcomposer.org/):

```
$ composer require gids-open-standaarden/open-pgo-medmij-implementatie-bouwstenen-php ~0.2

```

Configuration
=============

[](#configuration)

The building blocks use a HTTP client ([Guzzle](https://github.com/guzzle/guzzle)) to connect.

For example the Whitelist client can be constructed like this:

```
$whitelistClient = new \MedMij\OpenPGO\Whitelist\WhitelistClient(
    new \GuzzleHttp\Client(),
    'whitelist endpoint'
);
```

Use cases
=========

[](#use-cases)

Retrieve Whitelist
------------------

[](#retrieve-whitelist)

see

The `WhitelistClient` can be used to retrieve the `Whitelist`.

```
$whitelist = $whitelistClient->getWhitelist();
```

The `WhitelistService` provides a convenience method `isMedMijNodeWhitelisted` to check if a given node is whitelisted.

```
$service = new \MedMij\OpenPGO\Whitelist\WhitelistService($whitelistClient);

$service->isMedMijNodeWhitelisted('specimen-stelselnode.medmij.nl');
```

Retrieve OCL
------------

[](#retrieve-ocl)

see

The `OAuthClientListClient` can be used to retrieve the `OAuthclientlist`.

```
$client = new \MedMij\OpenPGO\OCL\OAuthClientListClient(
    new \GuzzleHttp\Client(),
    'OAuth Client List endpoint'
);

$client->getOAuthClientList();
```

The `OAuthClientService` provides a convenience method `getOAuthClientByHostname` to get an `OAuthClient`by its unique hostname.

```
$service = new \MedMij\OpenPGO\OCL\OAuthClientService($client);

$service->getOAuthClientByHostname('medmij.deenigeechtepgo.nl');
```

Retrieve ZAL
------------

[](#retrieve-zal)

see

The `ZALClient` can be used to retrieve the `Zorgaanbiederslijst`.

```
$client = new \MedMij\OpenPGO\ZAL\ZALClient(
    new \GuzzleHttp\Client(),
    'ZAL endpoint'
);

$client->getZAL();
```

The `ZorgaanbiederService` provides a convenience method `getZorgaanbiederByName` to get a `Zorgaanbieder`by its unique name.

```
$service = new \MedMij\OpenPGO\ZAL\ZorgaanbiederService($client);

$service->getZorgaanbiederByName('umcharderwijk@medmij');
```

Retrieve Gegevensdienstnamenlijst
---------------------------------

[](#retrieve-gegevensdienstnamenlijst)

The `GegevensdienstnamenlijstClient` can be used to retrieve the `Gegevensdienstnamenlijst`.

```
$client = new \MedMij\OpenPGO\GNL\GegevensdienstnamenlijstClient(
    new \GuzzleHttp\Client(),
    'gegevensdienstnamenlijst endpoint'
);

$client->getGegevensdienstnamenlijst();
```

The `GegevensdienstnamenlijstService` provides a convenience method `getGegevensdienstById` to get a `Gegevensdienst`by its unique identifier.

```
$service = new \MedMij\OpenPGO\GNL\GegevensdienstnamenlijstService($client);

$service->getGegevensdienstById(42);
```

OAuth
-----

[](#oauth)

This library provides the building blocks for [Three Legged OAuth 2](http://oauthbible.com/#oauth-2-three-legged) authentication.

A PGO GW can authenticate with a ZA GW using a `ZorgaanbiederProvider` which is configured with

- an OAuthclient as listed in the OAuthClientList
- a Gegevensdienst as listed in the Zorgaanbiederslijst.

```
$oAuthClient = new OAuthClient('medmij.deenigeechtepgo.nl', 'De Enige Echte PGO');

$gegevensdienst = new Gegevensdienst(
    '4',
    new AuthorizationEndpoint('https://medmij.nl/dialog/oauth'),
    new TokenEndpoint('https://medmij.nl/token'),
    []
);

$zorgaanbieder = (new ZorgaanbiederProviderFactory())->create($oAuthClient, $gegevensdienst);
```

### Step 1. Application redirects User to Service for Authorization

[](#step-1-application-redirects-user-to-service-for-authorization)

```
header('Location: ' . $provider->getAuthorizationUrl();
exit;
```

Note: store the state ($provider-&gt;getState()) to prevent replay attacks.

### Step 2. User logs into the Service and grants Application access.

[](#step-2-user-logs-into-the-service-and-grants-application-access)

### Step 3. Service redirects User back to the redirect\_url.

[](#step-3-service-redirects-user-back-to-the-redirect_url)

### Step 4. Application takes the code and exchanges it for an Access Token

[](#step-4-application-takes-the-code-and-exchanges-it-for-an-access-token)

```
$provider->getAccessToken('authorization_code', [
    'code' => '1234'
]);
```

Development
===========

[](#development)

Clone this repository and run `composer install` to install the dependencies.

Testing
-------

[](#testing)

This library is tested using [PHPUnit](https://phpunit.de/).

The tests can be executed with this command:

```
vendor/bin/phpunit

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84% 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 ~62 days

Total

2

Last Release

2746d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e56158df0a7656e82c3fe2cee4d8173ef9c26fcd8882abd7dadfbdbd9eb93f89?d=identicon)[othillo](/maintainers/othillo)

---

Top Contributors

[![othillo](https://avatars.githubusercontent.com/u/2786663?v=4)](https://github.com/othillo "othillo (21 commits)")[![relitodea](https://avatars.githubusercontent.com/u/5028884?v=4)](https://github.com/relitodea "relitodea (3 commits)")[![IvoBrandjes](https://avatars.githubusercontent.com/u/43574686?v=4)](https://github.com/IvoBrandjes "IvoBrandjes (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gids-open-standaarden-open-pgo-medmij-implementatie-bouwstenen-php/health.svg)

```
[![Health](https://phpackages.com/badges/gids-open-standaarden-open-pgo-medmij-implementatie-bouwstenen-php/health.svg)](https://phpackages.com/packages/gids-open-standaarden-open-pgo-medmij-implementatie-bouwstenen-php)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.7k371.6k6](/packages/theodo-group-llphant)

PHPackages © 2026

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