{"id":21446917,"url":"https://github.com/bioid-gmbh/bwsclient-restgrpc-csharp","last_synced_at":"2025-04-19T20:52:29.833Z","repository":{"id":263965899,"uuid":"871282988","full_name":"BioID-GmbH/BWSClient-RestGrpc-CSharp","owner":"BioID-GmbH","description":"BWS 3: The BioID RestGrpcForwarder project is an ASP.NET service that receives RESTful calls and forwards these calls to the gRPC endpoint of the BioID Web Service 3.","archived":false,"fork":false,"pushed_at":"2025-01-15T12:10:53.000Z","size":29491,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-15T14:01:11.886Z","etag":null,"topics":["asp-net-core","bioid","bws-3","grpc","restful"],"latest_commit_sha":null,"homepage":"","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/BioID-GmbH.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-10-11T16:22:06.000Z","updated_at":"2025-01-15T12:10:54.000Z","dependencies_parsed_at":"2025-01-15T13:31:12.483Z","dependency_job_id":"e219dceb-2a70-4ec5-944b-9221f7deedb8","html_url":"https://github.com/BioID-GmbH/BWSClient-RestGrpc-CSharp","commit_stats":null,"previous_names":["bioid-gmbh/bwsclient-restgrpc-csharp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBWSClient-RestGrpc-CSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBWSClient-RestGrpc-CSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBWSClient-RestGrpc-CSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioID-GmbH%2FBWSClient-RestGrpc-CSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BioID-GmbH","download_url":"https://codeload.github.com/BioID-GmbH/BWSClient-RestGrpc-CSharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235271510,"owners_count":18963433,"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":["asp-net-core","bioid","bws-3","grpc","restful"],"created_at":"2024-11-23T03:08:18.097Z","updated_at":"2025-01-23T11:27:55.125Z","avatar_url":"https://github.com/BioID-GmbH.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ASP.NET service for receiving RESTful calls for BioID Web Service gRPC API\n\n## Overview\n\nThe **BioID RestGrpcForwarder** project is an ASP.NET service that receives RESTful calls and forwards these calls \nto the gRPC endpoint of the BioID Web Service 3. \n\nThis approach allows you to utilize the advantages of gRPC (e.g. low latency and protocol buffer) while providing a \nRESTful API that is used by your client app(s).\n\nTo get a first impression of how our new biometric services work, you can try them out on our [BioID Playground][playground].\n\n## Technologies\n- ASP.NET Core 8\n- RESTful API\n- gRPC\n- C#\n\n## Project structure\n- `Properties/`\n    - `launchsettings.json` - For configuring how the application is launched and debugged during development.\n  The port on which the app runs can also be set here. It is only relevant if you start in Visual Studio.\n- `Auth/` - Contains custom authentication handlers that manage user authentication and authorization.\n- `Controllers/` - Contains the controllers for the RESTful API endpoints.\n- `DataTypes/` - Data types represent the data structures with which the application works.\n- `protos/` - Contains a ProtoBuf file that is used to define the structure of data for gRPC services.\n- `RestApiClients/` - Contains predefined lightweight REST client files dedicated to testing the application's RESTful API endpoints.\n- `appsettings.json` - This file is for application specific configurations in an ASP.NET Core application.\n- `Program.cs` - This is the main entry point of the application.\n\n## Get Started\nThis sample is built with [.NET 8][dotnet8] and runs on Windows, Linux, and macOS.\n\nDownload a [development tool][dotnettools] for Windows, Linux, or macOS. You can use your preferred development environment,\nsuch as Visual Studio, Visual Studio Code, Visual Studio for Mac, the .NET Core CLI, or other .NET tools.\n\nThe ASP.NET service accepts RESTful requests, extracts e.g. input images (encoded as Base64 strings) from these requests,\nand converts them into byte arrays. These images as byte array are then sent to the BioID Web Service (BWS) gRPC endpoint using a gRPC client. \nThe response from the BWS is returned to this service via gRPC and then used as the response for the RESTful call.\n\nDepending on which gRPC API is used, additional parameters can also be transferred.\n\nIf you want to use your images or videos, you can convert them to or from a base64 encoded string using an online service like [base64.guru]. \nThis service can handle conversions in both directions. Any other service can also be used for the conversion.\n\n\u003e [!IMPORTANT]   \n\u003e Please use **base64** and not **base64url**.\n\n\n\u003e #### Before starting the service, follow these steps.\n\n\u003e - You need a **BioID Account** with a **confirmed** email address. If you don’t have one, [create a BioID account][bioidaccountregister].\n\u003e - You can create a free [trial subscription][trial] of the BioID Web Service (BWS) once you've created your BioID account.\n\u003e - After you have signed in to the BWS Portal and created the trial subscription with the help of a wizard, you still need to create a BWS 3 client.\n\u003e - The client can be created with the help of a creation wizard.\n\u003e - If you have created a client, click on `Show client keys` to open the dialog box that displays the `ClientId` and `Keys` for your client.\n\n\u003e  **The ClientId and Key will be explained in detail later on where to insert them.** \n \n\n### Installation\n  \n1. Clone the repository.\n   ```cmd\n    git clone https://github.com/BioID-GmbH/BWSClient-RestGrpc-CSharp.git\n    ```\n\n2. Change the current directory to the BWSClient-RestGrpc-CSharp folder\n   ```cmd\n    cd BWSClient-RestGrpc-CSharp\n    ```\n\n3. Navigate to the project folder and install the dependencies.\n    ```cmd\n    dotnet restore\n    ```\n\n4. Add your BWS gRPC client Id and access key to the `appsettings.json` file so that you can communicate with our BWS 3.\nInstructions on where to obtain these are provided above.\nThe settings file is located in the root folder of the app.\n\n\n![BWS gRPC endpoint, client Id and access key](/bwsSettings.png)\n\n5. Launch the application.\n    ```cmd\n    dotnet run --project BioID.RestGrpcForwarder.csproj\n    ```\n \n#### Example endpoints\n*The current version of the app includes three new BWS APIs: [LivenessDetection][liveness], [PhotoVerify][photoverify]\nand [VideoLivenessDetection][videoliveness].*\n\n \u003e .http files are a Visual Studio feature and can only be run in Visual Studio. These files act as REST clients that you can use to test endpoints.\n \u003e Outside of Visual Studio, other tools like `Postman` are commonly used to test APIs.\n\n- **Liveness Detection**:\n  - `RestApiClients/livenessDetection.http` - *Active livenessdetetction with 2 live images.* \n  - `RestApiClients/passiveLivenessDetection.http` - *Passive livenessdetetction with 1 live image.*\n  - `RestApiClients/challengeResponse.http` - *Active livenessdetetction with 2 live images and additionally challenge response mechanism.*\n  \n- **PhotoVerify**:\n  - `RestApiClients/photoverify.http`\n  \n- **VideoLivenessDetection**:\n  - `RestApiClients/videoLivenessDetection.http`\n\n[dotnet8]: https://dotnet.microsoft.com/download \"Download .NET 8\"\n[dotnettools]: https://dotnet.microsoft.com/platform/tools \".NET Tools \u0026 Editors\"\n[base64.guru]: https://base64.guru/ \"Base64 String online converter\" \n[bioidaccountregister]: https://account.bioid.com/Account/Register \"Register a BioID account\" \n[trial]: https://bwsportal.bioid.com/ \"Create a free trial subscription\"\n[bwsportal]: https://bwsportal.bioid.com \"BWS Portal\"\n[liveness]: https://developer.bioid.com/bws/grpc/livenessdetection/ \"Presentation attack detection.\"\n[photoverify]: https://developer.bioid.com/bws/grpc/photoverify/ \"PhotoVerify\"\n[videoliveness]: https://developer.bioid.com/bws/grpc/videolivenessdetection/ \"Presentation attack detection in videos.\"\n[playground]: https://playground.bioid.com \"BioID Playground\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioid-gmbh%2Fbwsclient-restgrpc-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbioid-gmbh%2Fbwsclient-restgrpc-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbioid-gmbh%2Fbwsclient-restgrpc-csharp/lists"}