{"id":21670505,"url":"https://github.com/engineering87/pdnd-client-assertion-generator","last_synced_at":"2025-07-18T02:31:33.506Z","repository":{"id":257813956,"uuid":"848870159","full_name":"engineering87/pdnd-client-assertion-generator","owner":"engineering87","description":".NET Client Assertion Generator for PDND Service API - This repository has been migrated to Developers Italia","archived":false,"fork":false,"pushed_at":"2024-10-21T16:21:57.000Z","size":82,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-22T04:35:42.553Z","etag":null,"topics":["assertion","authentication","dotnet","e-service","government","jwt","oauth2","pdnd","pubblica-amministrazione"],"latest_commit_sha":null,"homepage":"https://developers.italia.it/it/pdnd/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/engineering87.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-28T14:55:58.000Z","updated_at":"2024-10-21T16:22:01.000Z","dependencies_parsed_at":"2024-10-22T15:58:45.237Z","dependency_job_id":null,"html_url":"https://github.com/engineering87/pdnd-client-assertion-generator","commit_stats":null,"previous_names":["engineering87/pdnd-client-assertion-generator"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineering87%2Fpdnd-client-assertion-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineering87%2Fpdnd-client-assertion-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineering87%2Fpdnd-client-assertion-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/engineering87%2Fpdnd-client-assertion-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/engineering87","download_url":"https://codeload.github.com/engineering87/pdnd-client-assertion-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226329709,"owners_count":17607868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assertion","authentication","dotnet","e-service","government","jwt","oauth2","pdnd","pubblica-amministrazione"],"created_at":"2024-11-25T12:32:41.796Z","updated_at":"2024-11-25T12:32:42.415Z","avatar_url":"https://github.com/engineering87.png","language":"C#","readme":"# PDND Client Assertion Generator\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Nuget](https://img.shields.io/nuget/v/PDNDClientAssertionGenerator?style=plastic)](https://www.nuget.org/packages/PDNDClientAssertionGenerator)\n![NuGet Downloads](https://img.shields.io/nuget/dt/PDNDClientAssertionGenerator)\n[![Build](https://github.com/engineering87/pdnd-client-assertion-generator/actions/workflows/dotnet.yml/badge.svg)](https://github.com/engineering87/pdnd-client-assertion-generator/actions/workflows/dotnet.yml)\n[![issues - pdnd-client-assertion-generator](https://img.shields.io/github/issues/engineering87/pdnd-client-assertion-generator)](https://github.com/engineering87/pdnd-client-assertion-generator/issues)\n[![Language - C#](https://img.shields.io/static/v1?label=Language\u0026message=C%23\u0026color=blueviolet)](https://dotnet.microsoft.com/it-it/languages/csharp)\n[![stars - pdnd-client-assertion-generator](https://img.shields.io/github/stars/engineering87/pdnd-client-assertion-generator?style=social)](https://github.com/engineering87/pdnd-client-assertion-generator)\n\n.NET implementation of **OAuth2** authentication for **PDND** service with client assertion generation.\n\n**This repository has been migrated to the [Developers Italia](https://github.com/italia) community [PDND Client Assertion Generator](https://github.com/italia/pdnd-client-assertion-generator)**.\n\n## Contents\n- [PDND](#pdnd)\n- [Voucher](#voucher)\n- [Requesting a Voucher](#requesting-a-voucher)\n- [How to Use the Client Assertion Generator](#how-to-use-the-client-assertion-generator)\n- [Licensee](#licensee)\n- [Contact](#contact)\n\n## PDND\nThe **[Piattaforma Digitale Nazionale Dati (PDND)](https://developers.italia.it/it/pdnd/)** is an Italian digital infrastructure designed to facilitate **data interoperability** and exchange between public administrations and private entities. The platform aims to simplify the sharing of public data by providing a secure, standardized, and centralized system for data integration, access, and management. PDND promotes digital transformation within the public sector by ensuring data is accessible, reliable, and reusable, enabling more efficient public services, enhancing transparency, and supporting **data-driven decision-making** for both government and citizens.\n\n## Voucher\nVouchers are simple JWT tokens. The implemented authentication flow is OAuth 2.0, which refers to [**RFC6750**](https://datatracker.ietf.org/doc/html/rfc6750) for the use of Bearer tokens and to [**RFC7521**](https://datatracker.ietf.org/doc/html/rfc7521) for client authorization via client assertion.\n\n## Requesting a Voucher\nTo obtain a valid voucher, you must first upload at least one public key to an interop API client. The first step is to create a valid client assertion and sign it with your private key (which must match the public key registered with the client on PDND Interoperabilità). The client assertion consists of a header and a payload.\n\n## Voucher Flow for Interoperability APIs\nThe user requests a voucher. Once obtained, they include it as an authorization header in subsequent calls to the PDND Interoperability APIs.\n\n## How to Use the Client Assertion Generator\nTo properly set up and use the Client Assertion Generator in your ASP.NET Core application, follow these steps:\n\n1. Configure Client Assertion Settings, an example below:\n  ```xml\n  \"ClientAssertionConfig\": {\n    \"ServerUrl\": \"\",\n    \"KeyId\": \"ZmYxZGE2YjQtMzY2Yy00NWI5LThjNGItMDJmYmQyZGIyMmZh\",\n    \"Algorithm\": \"RS256\",\n    \"Type\": \"at+jwt\",\n    \"ClientId\": \"9b361d49-33f4-4f1e-a88b-4e12661f2309\",\n    \"Issuer\": \"interop.pagopa.it\",\n    \"Subject\": \"9b361d49-33f4-4f1e-a88b-4e12661f2309\",\n    \"Audience\": \"https://erogatore.example/ente-example/v1\",\n    \"PurposeId\": \"1b361d49-33f4-4f1e-a88b-4e12661f2300\",\n    \"KeyPath\": \"/path/\",\n    \"Duration\": \"600\"\n  },\n  ```\n\n2. Register Services:\n  ```csharp\n  builder.Services.AddPDNDClientAssertionServices();\n  ```\n\nThen you can use `ClientAssertionGeneratorService`, which provides the following methods:\n- `GetClientAssertionAsync`\n- `GetTokenAsync(clientAssertion)`\n\n## Testing the PDNDClientAssertionGenerator\nThis project includes a test application, **PDNDClientAssertionGenerator.Api**, designed to help you test the software with your own configuration. This application acts as a sandbox where you can validate the behavior of the PDNDClientAssertionGenerator components.\n\n### How to Use the Test Application:\n\n1. Configuration: Update the configuration settings in the `appsettings.json` file or through environment variables to match your specific use case and environment.\n\n2. Running the Test Application:\n    - Navigate to the PDNDClientAssertionGenerator.Api folder.\n    - Use the following command to run the application:  \n      `dotnet run --project src/PDNDClientAssertionGenerator.Api/PDNDClientAssertionGenerator.Api.csproj`\n  \n3. Testing Scenarios: Once the application is running, you can use various `GetClientAssertion` and `GetToken` to test the functionality of the software in different configurations.\n\n## How to Contribute\nThank you for considering to help out with the source code!\nIf you'd like to contribute, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base.\n\n * [Setting up Git](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git)\n * [Fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)\n * [Open an issue](https://github.com/engineering87/pdnd-client-assertion-generator/issues) if you encounter a bug or have a suggestion for improvements/features\n\n## Licensee\nRepository source code is available under MIT License, see license in the source.\n\n## Contact\nPlease contact at francesco.delre.87[at]gmail.com for any details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineering87%2Fpdnd-client-assertion-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fengineering87%2Fpdnd-client-assertion-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fengineering87%2Fpdnd-client-assertion-generator/lists"}