<h1 align=center>The Common Check widget Backend Libary</h1>
<p align=center>
  <img src="https://img.shields.io/badge/built-with%20love-pink?style=for-the-badge" />
  <img src="https://img.shields.io/badge/by-affinidi-blue?style=for-the-badge" />
  <img src="https://img.shields.io/badge/for-the%20world-green?style=for-the-badge"/>
</p>

- [Getting started](#getting-started)
- [The Common Check Widget Backend Libary](#the-common-check-widget-backend-libary)
  - [Example in Javascript](#example-in-javascript)
  - [Example in Python](#example-in-python)
  - [Example in dotNET](#example-in-dotnet)
- [The Common Check Widget Documentation](#the-common-check-widget-documentation)



# Getting started

## Private Key File & Environment Variables 

You will need to have privateKey.pem and .env with parameters below.

| Property                | Description                                       |
| ----------------------- | --------------------------------------------------|
| `API_KEY`               | License Key to Commone Check API endpoint         |
| `ENDPOINT`              | Commone Check endpoint URL                        |
| `ERROR_CODE`            | Error Code Return To Widget ('5000')              |
| `SECRET_PASSPHRASE`     | SECRET_PASSPHRASE use to generate private key     |  
| `PRIVATE_KEY_FILE_NAME` | Private Key File Name (privateKey.pem)            |  
| `privateKey.pem`        | Private Key File generated by JWT Web Token       |       


# The Common Check Widget Backend Libary

This package will available on public packages hosts npmjs.org (npm), PyPI (Python), (nuget.org (NuGet), and Maven Central (Maven)) 

| Host                    | URL                                                                                     |
| ----------------------- | ----------------------------------------------------------------------------------------|
| npmjs.org (npm)         | https://www.npmjs.com/package/@affinidi/common-check-widget-backend-lib/                |
| PyPI (Python)           | https://pypi.org/project/affinidi.common-check-widget-backend-lib/                      |
| nuget.org (NuGet)       | https://www.nuget.org/packages/Affinidi.Common.Check.Widget.Backend.Lib/                |   
| Maven Central (Maven)   | https://search.maven.org/artifact/org.affinity-project/common-check-widget-backend-lib  |   


## Example in Javascript
Dependency libaries
```
    "@affinidi/common-check-widget-backend-lib": "^x.x.x",
    "cors": "^2.8.5",
    "express": "^4.17.1",
    "express-form-data": "^2.0.17"
```
Sample Code
```Javascript
```

## Example in Python
Dependency libaries
```
flask==1.1.1
affinidi.common-check-widget-backend-lib==x.x.x
```
Sample Code
```Python
```

## Example in dotNET
Dependency libaries
```
    <PackageReference Include="Affinidi.Common.Check.Widget.Backend.Lib" Version="x.x.x" />
    <PackageReference Include="Microsoft.AspNet.WebApi" Version="5.2.7" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
```
Sample Code

```

# The Common Check Widget Documentation

Here is our common check widget link: https://doc.common-check-widget.affinity-project.org/#/

