minvws/puzi-laravel
Composer 安装命令:
composer require minvws/puzi-laravel
包简介
Laravel authentication middleware for UZI passes.
README 文档
README
pUZI Laravel
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 (in Dutch).
pUZI is a simple and functional module which allows you to use the UZI cards as authentication mechanism. It consists of:
- a reader that reads the data on the card and gives an UziUser object in return.
- middleware (for the Laravel framework) that allows authentication and user creation based on UZI cards (this repository).
For documentation, software and to apply for an UZI card, please check out 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 & Sport, programma Realisatie Digitale Ondersteuning.’
Questions and contributions are welcome via GitHub.
Requirements
- PHP 8
- Laravel 8 or later.
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
Composer
composer require minvws/puzi-laravel
Manual
Add the following to your composer.json and then run composer install.
{
"require": {
"minvws/puzi-laravel": "^v3.0"
}
}
Usage
php artisan vendor:publish --provider="MinVWS\PUZI\Laravel\UziServiceProvider"
Add to $routeMiddleware array in app/Http/Kernel.php:
'auth.uzi' => \MinVWS\PUZI\Laravel\Middleware\AuthenticateWithUzi::class,
Add some allowed_types and allowed_roles to the config/uzi.php.
For example:
// Which card types are allowed to log in 'allowed_types' => [ \MinVWS\PUZI\UziConstants::UZI_TYPE_CARE_PROVIDER ], // Which roles are allowed to log in 'allowed_roles' => [ \MinVWS\PUZI\UziConstants::UZI_ROLE_DOCTOR ],
In routes/web.php add the middleware to some routes, for example:
Route::middleware(['auth:web,auth.uzi'])->group(function () { Route::get('/any', [Controller::class, 'all'])->name('any'); Route::get('/all', [Controller::class, 'all'])->name('all'); }); Route::middleware('auth.uzi')->group(function () { Route::get('/uzi', [Controller::class, 'uzi'])->name('uzi'); });
Uses
puzi-php - Proficient UZI pass reader in PHP
phpseclib - PHP Secure Communications Library
Contributing
-
Fork the Project
-
Ensure you have Composer installed (see Composer Download Instructions)
-
Install Development Dependencies
composer install
-
Create a Feature Branch
-
(Recommended) Run the Test Suite
vendor/bin/phpunit
-
(Recommended) Check whether your code conforms to our Coding Standards by running
vendor/bin/phpstan analyse vendor/bin/psalm vendor/bin/phpcs
-
Send us a Pull Request
minvws/puzi-laravel 适用场景与选型建议
minvws/puzi-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.51k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 03 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「security」 「cryptography」 「crypto」 「signature」 「x509」 「x.509」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 minvws/puzi-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 minvws/puzi-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 minvws/puzi-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
DUKPT implementation in PHP
Provide a way to secure accesses to all routes of an symfony application.
High-level cryptographic primitives and security utilities for Maatify systems including password hashing, reversible encryption, HKDF key derivation, and key rotation.
A library for reading KeePass 2.x databases
It's a barebone security class written on PHP
A fast and dynamic Merkle tree implementation
统计信息
- 总下载量: 2.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: EUPL-1.2
- 更新时间: 2021-03-08