GreenPass 0.7.0

Install-Package GreenPass -Version 0.7.0
dotnet add package GreenPass --version 0.7.0
<PackageReference Include="GreenPass" Version="0.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GreenPass --version 0.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GreenPass, 0.7.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install GreenPass as a Cake Addin
#addin nuget:?package=GreenPass&version=0.7.0

// Install GreenPass as a Cake Tool
#tool nuget:?package=GreenPass&version=0.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

GreenPass

Demo GreenPass API

To use the demo, call any of the methods available under the Validation controller passing GreenPass raw string as input (e.g. HC1:...) The trust list and business rules are updated every 24h. This demo adheres to Italian official rules for date expiration calculation but is provided without any legal guarantee, no SLA and no uptime guarantee.

By Luca Pisano

This package enables Green Pass QR code reading and reading NuGet available at NuGet.Org/packages/GreenPass

Features

  • .NET Standard 2.1 runs on any platform. Docker, Windows, Linux, MacOS, Android, iOS, Smartwatches, Raspberry, Embedded Controllers, ecc
  • Decode QR Code string into readable JSON
  • Verify GreenPass using official Trust List servers
  • Validation certificates caching for configurable TimeSpan to improve performance (default is 24h)
  • Support for custom Trust List servers is provided using appsettings.json

Current implementation does not check for certificate revocation lists, if any jurisdiction uses them.

//In ASP.NET Core projects, call .AddGreenPassValidator() in ConfigureServices() method
public void ConfigureServices(IServiceCollection services)
        {
            services.AddGreenPassValidator(Configuration)
            ;            
        }
var res = await _sp.GetRequiredService<ValidationService>().Validate(scanResult);
if(res.IsInvalid)
/*certificate is invalid, either expired or not yet valid*/

This is an example of how you can configure it

{
  "ValidatorOptions": {
    "CertificateListProviderUrl": "https://dgcg.covidbevis.se/tp/trust-list"    
    }
}

Actual rules verification is implemented for Italian DGC server format available at https://get.dgc.gov.it/v1/dgc/settings Special thanks to the authors of DGCValidator https://github.com/ehn-dcc-development/DGCValidator

Any artifact present in this repository, code included, is made under pure personal terms and is not related to my job.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.7.0 256 9/21/2021
0.2.0 115 9/2/2021
0.1.0 69 9/2/2021