{"id":21640003,"url":"https://github.com/minvws/puzi-php","last_synced_at":"2025-04-11T16:53:04.381Z","repository":{"id":53484988,"uuid":"345361438","full_name":"minvws/pUZI-php","owner":"minvws","description":"Proficient UZI pass reader in php.","archived":false,"fork":false,"pushed_at":"2024-11-06T12:59:40.000Z","size":2953,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-07T09:14:03.870Z","etag":null,"topics":["php","uzi-card"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minvws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.pdf","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-07T14:02:20.000Z","updated_at":"2024-11-06T12:59:41.000Z","dependencies_parsed_at":"2024-06-21T16:42:19.056Z","dependency_job_id":"bd9d787b-69e5-4bb7-9a8f-839e437ebbf3","html_url":"https://github.com/minvws/pUZI-php","commit_stats":{"total_commits":109,"total_committers":7,"mean_commits":"15.571428571428571","dds":0.5871559633027523,"last_synced_commit":"1580b2891dd0e9b4f13fff118b15fd15c2a552bb"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minvws%2FpUZI-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minvws%2FpUZI-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minvws%2FpUZI-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minvws%2FpUZI-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minvws","download_url":"https://codeload.github.com/minvws/pUZI-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248443488,"owners_count":21104431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","uzi-card"],"created_at":"2024-11-25T04:15:54.359Z","updated_at":"2025-04-11T16:53:04.358Z","avatar_url":"https://github.com/minvws.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![pUZI logo](pUZI.svg \"pUZI logo\" )\n# pUZI php\n\n[![PHP](https://github.com/minvws/pUZI-php/actions/workflows/test.yml/badge.svg)](https://github.com/minvws/pUZI-php/actions/workflows/test.yml)\n\nProficient UZI pass reader in php.\n\nThe 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 (in Dutch).\n\npUZI is a simple and functional module which allows you to use the UZI cards as authentication mechanism. It consists of:\n\n1. a reader that interprets the PKCS11 data the card middleware provides to the webserver and returns an UziUser object in return (this repository).\n2. middleware (currently only for the Laravel framework) that allows authentication and user creation based on UZI cards.\n\nFor documentation, software and to apply for an UZI card, please check out [www.uziregister.nl](https://www.uziregister.nl).\n\npUZI 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 \u0026 Sport, programma Realisatie Digitale Ondersteuning.’\n\nQuestions and contributions are welcome via [GitHub](https://github.com/minvws/pUZI-php/issues).\n\n## Requirements\n\n* PHP \u003e= 7.4\n\nApache config (or NginX equivalent):\n```apacheconf\nSSLEngine on\nSSLProtocol -all +TLSv1.3\nSSLHonorCipherOrder on\nSSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384\nSSLVerifyClient require\nSSLVerifyDepth 3\nSSLCACertificateFile /path/to/uziCA.crt\nSSLOptions +StdEnvVars +ExportCertData\n```\n\n## Installation\n\n### Composer\n\n```sh\ncomposer require minvws/puzi-php\n```\n\n### Manual\n\nAdd the following to your `composer.json` and then run `composer install`.\n\n```json\n{\n    \"require\": {\n        \"minvws/puzi-php\": \"^v2.0\"\n    }\n}\n```\n\n## Usage\n\n```php\n\n// Request from your framework/controller\n$uzi = new \\MinVWS\\PUZI\\UziReader();\n$user = $uzi-\u003egetDataFromRequest($request);\nprint $user-\u003egetUziNumber();\n\n// In case of no request (deprecated):\n$uzi = new \\MinVWS\\PUZI\\UziReader();\n$user = $uzi-\u003egetData();\n\nprint $user-\u003egetUziNumber();\nvar_dump($user-\u003etoArray());\n```\n\n```text\narray(9) {\n  'agb_code' =\u003e\n  string(8) \"00000000\"\n  'card_type' =\u003e\n  string(1) \"N\"\n  'given_name' =\u003e\n  string(4) \"john\"\n  'oid_ca' =\u003e\n  string(25) \"2.16.528.1.1003.1.3.5.5.2\"\n  'role' =\u003e\n  string(6) \"01.015\"\n  'subscriber_number' =\u003e\n  string(6) \"90000111\"\n  'sur_name' =\u003e\n  string(12) \"doe-11111111\"\n  'uzi_number' =\u003e\n  string(8) \"11111111\"\n  'uzi_version' =\u003e\n  string(1) \"1\"\n  'serial_number' =\u003e\n  string(8) \"11111111\"\n}\n```\n\nThis package also allows validation of the request:\n\n```php\n$allowedTypes = [\n    UziConstants::UZI_TYPE_CARE_PROVIDER,\n    UziConstants::UZI_TYPE_NAMED_EMPLOYEE,\n];\n$allowedRoles = [\n    UziConstants::UZI_ROLE_DOCTOR,    \n    UziConstants::UZI_ROLE_PHARMACIST,    \n];\n\n$validator = new UziValidator(new UziReader(), true, $allowedTypes, $allowedRoles);\nif ($validator-\u003eisValid($request)) {\n    print \"Validated as doctor or pharmasist\";\n}\n```\n\nYou can use either `isValid()`, which returns a boolean, or `validate()` which throws an exception when \nnot correctly validated.\n\n## Uses\n\n* phpseclib - [PHP Secure Communications Library](https://phpseclib.com/)\n\n## Used by\n\n* puzi-laravel - [Laravel wrapper for proficient UZI pass reader](https://github.com/minvws/pUZI-laravel) for Laravel 8 or later.\n* puzi-auth-bundle - [UZI authentication bundle for Symfony](https://github.com/minvws/puzi-auth-bundle) for Symfony 4 or later.\n\n## Alternatives\n\n* Python - [pUZI-python](https://github.com/minvws/pUZI-python)\n* Go - [go-uzi-middleware](https://github.com/minvws/go-uzi-middleware)\n* .NET - [UZI Card Authentication Server](https://github.com/hiddehs/UZI-Card-Authentication)\n\n## Contributing\n\n1. Fork the Project\n\n2. Ensure you have Composer installed (see [Composer Download Instructions](https://getcomposer.org/download/))\n\n3. Install Development Dependencies\n\n    ```sh\n    composer install\n    ```\n\n4. Create a Feature Branch\n\n5. (Recommended) Run the Test Suite\n\n    ```sh\n    vendor/bin/phpunit\n    ```\n   \n6. (Recommended) Check whether your code conforms to our Coding Standards by running\n\n    ```sh\n    vendor/bin/phpstan analyse\n    vendor/bin/psalm\n    vendor/bin/phpcs\n    ```\n\n7. Send us a Pull Request\n   \n![pUZI](pUZI-hidden.svg \"pUZI\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminvws%2Fpuzi-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminvws%2Fpuzi-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminvws%2Fpuzi-php/lists"}