Code Monkey home page Code Monkey logo

greenpassvalidator-1's Introduction

GreenPass

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.

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

Features

  • .NET Standard 2.0 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
  • Very Green Pass expiry date according to Italian rules

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.