PHPackages                             minvws/puzi-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. [Security](/categories/security)
4. /
5. minvws/puzi-php

ActiveLibrary[Security](/categories/security)

minvws/puzi-php
===============

PHP library to read data from an UZI pass.

v2.3.1(3y ago)88.5k52EUPL-1.2ShellPHP &gt;=7.4CI failing

Since Mar 7Pushed 6mo ago11 watchersCompare

[ Source](https://github.com/minvws/pUZI-php)[ Packagist](https://packagist.org/packages/minvws/puzi-php)[ RSS](/packages/minvws-puzi-php/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (10)Dependencies (7)Versions (21)Used By (2)

[![pUZI logo](pUZI.svg "pUZI logo")](pUZI.svg)

pUZI php
========

[](#puzi-php)

[![PHP](https://github.com/minvws/pUZI-php/actions/workflows/test.yml/badge.svg)](https://github.com/minvws/pUZI-php/actions/workflows/test.yml)

Proficient UZI pass reader in php.

The UZI card is part of an authentication mechanism for medical staff and doctors working in the Netherlands. The cards are distributed by the CIBG. More information and the relevant client software can be found at [www.uziregister.nl](http://www.uziregister.nl) (in Dutch).

pUZI is a simple and functional module which allows you to use the UZI cards as authentication mechanism. It consists of:

1. a reader that interprets the PKCS11 data the card middleware provides to the webserver and returns an UziUser object in return (this repository).
2. middleware (currently only for the Laravel framework) that allows authentication and user creation based on UZI cards.

For documentation, software and to apply for an UZI card, please check out [www.uziregister.nl](https://www.uziregister.nl).

pUZI is available under the EU PL licence. It was created early 2021 during the COVID19 campaign as part of the vaccination registration project BRBA for the ‘Ministerie van Volksgezondheid, Welzijn &amp; Sport, programma Realisatie Digitale Ondersteuning.’

Questions and contributions are welcome via [GitHub](https://github.com/minvws/pUZI-php/issues).

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4

Apache config (or NginX equivalent):

```
SSLEngine on
SSLProtocol -all +TLSv1.3
SSLHonorCipherOrder on
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLVerifyClient require
SSLVerifyDepth 3
SSLCACertificateFile /path/to/uziCA.crt
SSLOptions +StdEnvVars +ExportCertData
```

Installation
------------

[](#installation)

### Composer

[](#composer)

```
composer require minvws/puzi-php
```

### Manual

[](#manual)

Add the following to your `composer.json` and then run `composer install`.

```
{
    "require": {
        "minvws/puzi-php": "^v2.0"
    }
}
```

Usage
-----

[](#usage)

```
// Request from your framework/controller
$uzi = new \MinVWS\PUZI\UziReader();
$user = $uzi->getDataFromRequest($request);
print $user->getUziNumber();

// In case of no request (deprecated):
$uzi = new \MinVWS\PUZI\UziReader();
$user = $uzi->getData();

print $user->getUziNumber();
var_dump($user->toArray());
```

```
array(9) {
  'agb_code' =>
  string(8) "00000000"
  'card_type' =>
  string(1) "N"
  'given_name' =>
  string(4) "john"
  'oid_ca' =>
  string(25) "2.16.528.1.1003.1.3.5.5.2"
  'role' =>
  string(6) "01.015"
  'subscriber_number' =>
  string(6) "90000111"
  'sur_name' =>
  string(12) "doe-11111111"
  'uzi_number' =>
  string(8) "11111111"
  'uzi_version' =>
  string(1) "1"
  'serial_number' =>
  string(8) "11111111"
}

```

This package also allows validation of the request:

```
$allowedTypes = [
    UziConstants::UZI_TYPE_CARE_PROVIDER,
    UziConstants::UZI_TYPE_NAMED_EMPLOYEE,
];
$allowedRoles = [
    UziConstants::UZI_ROLE_DOCTOR,
    UziConstants::UZI_ROLE_PHARMACIST,
];

$validator = new UziValidator(new UziReader(), true, $allowedTypes, $allowedRoles);
if ($validator->isValid($request)) {
    print "Validated as doctor or pharmasist";
}
```

You can use either `isValid()`, which returns a boolean, or `validate()` which throws an exception when not correctly validated.

Uses
----

[](#uses)

- phpseclib - [PHP Secure Communications Library](https://phpseclib.com/)

Used by
-------

[](#used-by)

- puzi-laravel - [Laravel wrapper for proficient UZI pass reader](https://github.com/minvws/pUZI-laravel) for Laravel 8 or later.
- puzi-auth-bundle - [UZI authentication bundle for Symfony](https://github.com/minvws/puzi-auth-bundle) for Symfony 4 or later.

Alternatives
------------

[](#alternatives)

- Python - [pUZI-python](https://github.com/minvws/pUZI-python)
- Go - [go-uzi-middleware](https://github.com/minvws/go-uzi-middleware)
- .NET - [UZI Card Authentication Server](https://github.com/hiddehs/UZI-Card-Authentication)

Contributing
------------

[](#contributing)

1. Fork the Project
2. Ensure you have Composer installed (see [Composer Download Instructions](https://getcomposer.org/download/))
3. Install Development Dependencies

    ```
    composer install
    ```
4. Create a Feature Branch
5. (Recommended) Run the Test Suite

    ```
    vendor/bin/phpunit
    ```
6. (Recommended) Check whether your code conforms to our Coding Standards by running

    ```
    vendor/bin/phpstan analyse
    vendor/bin/psalm
    vendor/bin/phpcs
    ```
7. Send us a Pull Request

[![pUZI](pUZI-hidden.svg "pUZI")](pUZI-hidden.svg)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance47

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~55 days

Recently: every ~5 days

Total

14

Last Release

1173d ago

Major Versions

0.5.0 → v1.0.02023-02-06

v1.1.0 → v2.0.02023-02-07

PHP version history (2 changes)0.1.0PHP &gt;=7.3

v2.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/19b14ca62f80ce8c77ae749ddf04e2d4077451db9f701f3bd37dec1dc950c76b?d=identicon)[JayTaph](/maintainers/JayTaph)

![](https://www.gravatar.com/avatar/35585f12d5551026d3cf7e8e25170cd718a16a5017096b3201ed196311ac51d9?d=identicon)[annejan](/maintainers/annejan)

![](https://www.gravatar.com/avatar/44e7cc7a950c1f964d8c8a5e3421d5fa61d6592add09ee3936ed267d75b2be33?d=identicon)[rdobeheer](/maintainers/rdobeheer)

---

Top Contributors

[![annejan](https://avatars.githubusercontent.com/u/294470?v=4)](https://github.com/annejan "annejan (55 commits)")[![okoeroo](https://avatars.githubusercontent.com/u/217110?v=4)](https://github.com/okoeroo "okoeroo (45 commits)")[![jaytaph](https://avatars.githubusercontent.com/u/241458?v=4)](https://github.com/jaytaph "jaytaph (23 commits)")[![ricklambrechts](https://avatars.githubusercontent.com/u/1367665?v=4)](https://github.com/ricklambrechts "ricklambrechts (8 commits)")[![underdarknl](https://avatars.githubusercontent.com/u/1902670?v=4)](https://github.com/underdarknl "underdarknl (4 commits)")[![nicktencate](https://avatars.githubusercontent.com/u/4581304?v=4)](https://github.com/nicktencate "nicktencate (4 commits)")[![sigio](https://avatars.githubusercontent.com/u/781641?v=4)](https://github.com/sigio "sigio (3 commits)")[![ppvg](https://avatars.githubusercontent.com/u/67802?v=4)](https://github.com/ppvg "ppvg (1 commits)")

---

Tags

icorephpuzi-cardsecuritycryptographycryptosignaturex509asn1UZI

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/minvws-puzi-php/health.svg)

```
[![Health](https://phpackages.com/badges/minvws-puzi-php/health.svg)](https://phpackages.com/packages/minvws-puzi-php)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[ionux/phactor

Phactor is a high-performance PHP implementation of the elliptic curve math functions required to generate &amp; verify private/public (asymmetric) EC keypairs and ECDSA signatures based on secp256k1 curve parameters. This library also includes a class to generate Service Identification Numbers (SINs) based on the published Identity Protocol v1 spec.

5275.0k30](/packages/ionux-phactor)

PHPackages © 2026

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