GM.KYC.Identomat
1.0.0
dotnet add package GM.KYC.Identomat --version 1.0.0
NuGet\Install-Package GM.KYC.Identomat -Version 1.0.0
<PackageReference Include="GM.KYC.Identomat" Version="1.0.0" />
<PackageVersion Include="GM.KYC.Identomat" Version="1.0.0" />
<PackageReference Include="GM.KYC.Identomat" />
paket add GM.KYC.Identomat --version 1.0.0
#r "nuget: GM.KYC.Identomat, 1.0.0"
#:package GM.KYC.Identomat@1.0.0
#addin nuget:?package=GM.KYC.Identomat&version=1.0.0
#tool nuget:?package=GM.KYC.Identomat&version=1.0.0
GM.KYC
Know-your-customer verification for the GM.* ecosystem — document validity and liveness checks via
Identomat, behind a provider-agnostic surface so a second vendor is a registration change, not a
consumer change.
| Package | Purpose |
|---|---|
| GM.KYC | IKycVerificationService + the IKycProvider SPI + the orchestrator (normalize → store → delegate → audit) |
| GM.KYC.Domain | VerificationSession, KycDocument, LivenessResult, VerificationResult, and the VerificationStatus states |
| GM.KYC.Identomat | the Identomat provider: API client, DTOs, status mapping, webhook signature + dedup |
| GM.KYC.Persistence | audit-grade EF storage of attempts, results, and raw vendor responses |
services.AddGMKyc(o => o.MaxImageDimension = 2000)
.AddIdentomat(o => o.CompanyKeySecretName = "Identomat:CompanyKey")
.AddKycPersistence(o => o.UseNpgsql(connectionString));
AddGMKyc() names no vendor; AddIdentomat() plugs one in. A second provider later is .AddXyz() —
AddGMKyc never has to be renamed.
How it fits the ecosystem
The orchestrator does the cross-cutting work once, so the provider never re-implements it:
- GM.Documents.Images — every submitted document/liveness image is resized and EXIF/GPS-stripped before it leaves your service. (KYC-specific concerns like face-crop/quality scoring live here in KYC, not in the generic image package — this is the KYC domain layer over it.)
- GM.FileStorage — the normalized image is persisted via
IFileStorageService(its key is recorded for correlation/audit) before submission. - GM.Secrets — the Identomat
companyKeyand webhook secret come fromISecretsService, never appsettings or code. - GM.Idempotency — Identomat callbacks are at-least-once; the webhook is deduped (by a hash of the exact body, so retransmissions drop while genuine status transitions still flow).
- GM.Audit — does not exist yet. Until it does,
GM.KYC.Persistenceowns the audit trail behind the thinIKycAuditStoreseam, which is built to forward to GM.Audit rather than duplicate it.
The flow (Identomat is a hosted-widget vendor)
InitiateVerificationAsync→ IdentomatPOST /begin→ returns a session id and a widget URL. Redirect the applicant there; they complete capture and liveness in Identomat's widget.SubmitDocumentAsync/SubmitLivenessCheckAsync→ normalize + store the image, then attach it to the session (/upload-file) for flows that accept supplementary files.GetVerificationStatusAsync→ IdentomatPOST /result→ mapped to aVerificationResult.- The webhook (
IKycWebhookProcessor) verifies the signature, dedupes, fetches the authoritative result, and records it. Wire it to any endpoint (see the sample).
Status mapping
Identomat approved → Approved, rejected → Rejected (or RequiresResubmission for a
configured recoverable reject_reason.value), in-progress → Pending. Liveness comes from Identomat's
live / similarity fields.
⚠ Verify against your Identomat account
Built against Identomat's public API reference (external-api.identomat.com). A few things aren't fully
specified there and are isolated + flagged so they're trivial to correct — all in IdentomatOptions
or one class:
- Webhook signature scheme — the public reference doesn't document it. This assumes HMAC-SHA256
over the raw body with a secret from GM.Secrets (header
X-Identomat-Signature). Confirm the exact algorithm/header and adjustIdentomatWebhookSignatureVerifier. (AllowUnsignedWebhooksexists for when verification is terminated upstream.) - Document attach step/question keys — Identomat captures documents in the widget; the
upload-fileattach path needs your flow'sstepKey/questionKey(IdentomatOptions.DocumentStepKey, …). reject_reason.valuevocabulary — populateResubmissionRejectCodeswith the codes that mean "recoverable" for your config; everything else rejected is treated as final.document_typestrings and the exact webhook body shape (session-id field name) — best-effort mappings, flagged inIdentomatStatusMapper/ the webhook parser.
Tested
11 tests: the orchestrator (normalize + GPS-strip + store + delegate, over GM.Documents.Images and a
GM.Testing.Fakes storage double), the Identomat provider and status mapping (via a stubbed HttpClient,
companyKey sourced from a fake secrets service), and the webhook (HMAC verification + at-least-once
dedup over a real in-memory GM.Idempotency). Runnable usage:
GM.KYC.Samples.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- GM.Idempotency (>= 1.0.0)
- GM.KYC (>= 1.0.0)
- GM.Secrets (>= 1.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.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 | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 56 | 8/10/2026 |