nubium/covid19-vaccination-cert-validator

Digital COVID Certificate Validator

v1.0.0 2022-01-31 09:18 UTC

This package is auto-updated.

Last update: 2024-04-29 05:05:43 UTC


README

(by Nubium Development SE www.nubium.jobs)

68747470733a2f2f62616467656e2e6e65742f62616467652f7068702f253345253344372e342f677265656e 68747470733a2f2f62616467656e2e6e65742f62616467652f6c6963656e73652f47504c2d332e302d6f722d6c617465722f626c7565

Installation

To install latest version of nubium/covid19-vaccination-cert-validator use Composer.

composer require nubium/covid19-vaccination-cert-validator

Example

https://github.com/nubium/covid19-vaccination-cert-validator/tree/master/example

// read certificate
$hash = 'HC1:.....'; // HC1 code
$trustStore = new \App\TrustStore();
$certificateFactory = new \Nubium\DCCValidator\CertificateFactory($trustStore);

$certificate = $certificateFactory->create($hash);
$vaccinationEntry = $certificate->getVaccinationEntry();


// validation process
$blackListStore = new \App\BlackListStore();
$certificateValidator = new \App\CertificateValidator($blackListStore);

if ($certificateValidator->isValid($certificate) && $vaccinationEntry->isFullyVaccinated()) {
	// Certificate is valid and proves full vaccination
}