Fayda.IdNetSdk
1.0.2
dotnet add package Fayda.IdNetSdk --version 1.0.2
NuGet\Install-Package Fayda.IdNetSdk -Version 1.0.2
<PackageReference Include="Fayda.IdNetSdk" Version="1.0.2" />
<PackageVersion Include="Fayda.IdNetSdk" Version="1.0.2" />
<PackageReference Include="Fayda.IdNetSdk" />
paket add Fayda.IdNetSdk --version 1.0.2
#r "nuget: Fayda.IdNetSdk, 1.0.2"
#:package Fayda.IdNetSdk@1.0.2
#addin nuget:?package=Fayda.IdNetSdk&version=1.0.2
#tool nuget:?package=Fayda.IdNetSdk&version=1.0.2
IDA .NET SDK
.NET SDK for Fayda IDA (Identity Authentication) services. Provides a simple and intuitive interface for OTP generation, Yes/No authentication, and eKYC (Electronic Know Your Customer) operations.
Features
- OTP Management: Request and validate OTPs for Fayda ID verification
- Yes/No Authentication: Perform authentication using OTP challenges
- eKYC Services: Retrieve verified identity details securely
- Cryptographic Security: Supports RSA-OAEP encryption, AES-GCM decryption, and JWT signing/verification
- PKCS12 Key Support: Secure key and certificate management using PKCS12 keystores
- Flexible Configuration: Supports environment variables and programmatic configuration
- Robust Reliability: Comprehensive error handling, logging, and response validation
Designed for seamless integration with .NET applications interacting with Fayda IDA services.
Requirements
- .NET 8.0 or later
- PKCS12 key files for signing requests
Installation
NuGet Package
dotnet add package Fayda.IdNetSdk
Manual Installation
- Clone or download this repository
- Add a project reference to
IdNetSdk.csproj - Ensure you have the required dependencies (automatically included via NuGet)
Configuration
The SDK can be configured using environment variables or a configuration dictionary:
Environment Variables
PARTNER_ID: Your partner IDFAYDA_BASE_URL: Base URL for Fayda APIMISP_LICENSE_KEY: MISP license keyPARTNER_API_KEY: Partner API keyIDA_REFERENCE_ID: IDA reference IDP12_PATH: Path to directory containing PKCS12 key filesP12_PASSWORD: Password for PKCS12 filesIDA_SSL_VERIFY: Set to "true" to verify SSL certificates (default: "false")
Configuration Dictionary
Alternatively, you can provide configuration via a dictionary:
var config = new Dictionary<string, object?>
{
["partnerId"] = "your-partner-id",
["fayda.base.url"] = "https://api.fayda.et",
["mispLicenseKey"] = "your-license-key",
["partnerApiKey"] = "your-api-key",
["ida.reference.id"] = "your-reference-id",
["p12.path"] = "path/to/keys",
["p12.password"] = "your-password",
["ida.ssl.verify"] = false
};
Usage
Basic Example
using IdNetSdk.Client;
using IdNetSdk.Dto.Request;
// Initialize client with configuration
var config = new Dictionary<string, object?>
{
// ... configuration as shown above
};
var client = new EkycClient(config);
// Request OTP
var otpRequest = new OtpRequestDto
{
IndividualId = "1234567890123456",
IndividualIdType = "FAN",
OtpChannel = new[] { "email", "phone" }
};
var otpResponse = await client.RequestOtpAsync(otpRequest);
// Perform Yes/No Auth
var authRequest = new AuthRequestDto
{
IndividualId = "1234567890123456",
IndividualIdType = "FAN",
Otp = "123456"
};
var authResponse = await client.YesNoAuthAsync(authRequest);
// Perform eKYC
var ekycRequest = new AuthRequestDto
{
IndividualId = "1234567890123456",
IndividualIdType = "FAN",
Otp = "123456"
};
var ekycResponse = await client.PerformEkycAsync(ekycRequest);
Publishing to NuGet
Bump the version in
IdNetSdk.csproj: set<Version>(and optionally<PackageReleaseNotes>) to the new release (for example1.0.2).Restore and pack from the repository root:
dotnet restore IdNetSdk.csproj dotnet pack IdNetSdk.csproj -c Release -o ./artifactsThis produces
artifacts/Fayda.IdNetSdk.<version>.nupkgand a matching.snupkgsymbols package if you keep symbol packages enabled.Push with your NuGet API key (create one at nuget.org with scope Push for Fayda.IdNetSdk or the whole account):
dotnet nuget push artifacts/Fayda.IdNetSdk.<version>.nupkg --api-key <YOUR_API_KEY> --source https://api.nuget.org/v3/index.jsonOptionally push the symbol package (
*.snupkg) the same way so consumers get better debugging.Verify on nuget.org after indexing (usually a few minutes).
Consumers upgrade with:
dotnet add package Fayda.IdNetSdk --version <version>
License
MIT License
Support
For issues and questions, please contact the api_support@id.et.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Portable.BouncyCastle (>= 1.9.0)
- System.Net.Http.Json (>= 9.0.0)
- System.Text.Json (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 1.0.2: Unique 10-digit transaction IDs (NormalizeTransactionId) for OTP, auth, and eKYC; deprecated hard-coded default. IdNet.Api: load IdNetSdk.Api/.env first; optional MISP_LICENSE_KEY alias mispLicenseKey.