Alpha version of digital COVID-19 verification implementation with php.
Via Composer
$ composer require grambas/dcc-verifier
This SDK is used in Demo API Project- dcc-verifier.de which is also open sourced at grambas/dcc-verifier-api
This package implements Germany public trust list api repository. More about api - Open API specification
- Decode and read EU Digital COVID-19 Certificate data (DCC) of vaccination, recovery or test (PCR, Rapid) subject
- Validate DCC date of expiry
- Validate DCC against authoritative signer signature
- Use Germany trust list
- Ability to use own trust list repository
$trustListDir = '/tmp/de-trust-list'; // local dir for saving trust list json file
// 1. Download / Update Germany signer trust list
$client = new GermanyTrustListClient($trustListDir);
$client->update();
// 2. Init existing trust list repository.
$trustListRepository = new GermanyTrustListRepository($trustListDir);
// 3. Init verfier with qr code content
$qrCodeContent = 'HC1:...'
$verifier = new DccVerifier($qrCodeContent, $trustListRepository);
// 4. Decode & verify
$dcc = $verifier->decode(); // get certificate info
$verifier->verify(); // validate against signer signature
// 5. Validate if Certificate (Vaccination, Recovery or Test) conforms specific business rules for example if
// fully vaccinated or test is negetive
$isValid = $dcc->isValid()
// 6. Check certificate validation date
$validator = new DateValidator($dcc);
$isValidForDate = $validator->isValidForDate(new \DateTime());
Of course validation steps 4. 5. and 6 can be checked independently and in your preferred order
Please see CHANGELOG for more information on what has changed recently.
$ make test
$ make coverage
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email milius@mindau.de instead of using the issue tracker.
The MIT License (MIT), see License File and NOTICE for more information.