miEUDIverifier.Core
1.4.2
See the version list below for details.
dotnet add package miEUDIverifier.Core --version 1.4.2
NuGet\Install-Package miEUDIverifier.Core -Version 1.4.2
<PackageReference Include="miEUDIverifier.Core" Version="1.4.2" />
<PackageVersion Include="miEUDIverifier.Core" Version="1.4.2" />
<PackageReference Include="miEUDIverifier.Core" />
paket add miEUDIverifier.Core --version 1.4.2
#r "nuget: miEUDIverifier.Core, 1.4.2"
#:package miEUDIverifier.Core@1.4.2
#addin nuget:?package=miEUDIverifier.Core&version=1.4.2
#tool nuget:?package=miEUDIverifier.Core&version=1.4.2
miEUDIverifier.Core
Reusable .NET 8 library to read EUDI Wallet PID identity data (family name, given name,
date of birth) via the EUDI Verifier Backend REST API (OpenID4VP). It builds the DCQL request,
polls for the wallet response and extracts the identity data — for both mso_mdoc
(ISO/IEC 18013-5) and SD-JWT VC (dc+sd-jwt) credential formats, including SD-JWT
disclosure parsing.
Part of the miEUDIverifier project (Apache-2.0), which also ships a ready-to-run web app with a browser UI, REST API and Docker image.
Install
dotnet add package miEUDIverifier.Core
Usage
// Program.cs — register via DI (reads the "VerifierSettings" configuration section)
builder.Services.AddMiEUDIverifier(builder.Configuration);
// Resolve the service and run a verification
var verifier = app.Services.GetRequiredService<VerifierApiService>();
var tx = await verifier.InitializeTransactionAsync();
var deepLink = tx.BuildWalletDeepLink(); // openid4vp:// deep link for the wallet
var qrPng = QrCodeService.GeneratePng(deepLink); // QR code as PNG bytes
var envelope = await verifier.WaitForWalletResponseAsync(tx.TransactionId);
var identity = await verifier.ExtractIdentityDataAsync(envelope);
// identity.FamilyName, identity.GivenName, identity.BirthDate, identity.CredentialFormat
Configuration (VerifierSettings section)
{
"VerifierSettings": {
"BackendUrl": "https://verifier-backend.eudiw.dev"
}
}
| Key | Default | Description |
|---|---|---|
BackendUrl |
https://verifier-backend.eudiw.dev |
Base URL of the EUDI verifier backend (the REST API — not verifier.eudiw.dev, which serves the demo UI) |
IntendedUseId |
TEST-01 |
Wallet-RP Intended Use id sent as intended_use_id. eudiw.dev requires one since August 2026; TEST-01 is its public test entry |
PollIntervalSeconds |
3 |
Polling interval for the wallet response |
PollTimeoutSeconds |
120 |
Maximum wait time for the wallet response |
Profile |
openid4vp |
OpenID4VP profile (openid4vp or haip) |
JarMode |
by_reference |
How the authorization request JWT is passed |
RequestUriMethod |
post |
HTTP method for request_uri |
ResponseMode |
direct_post |
Wallet response mode |
AuthorizationRequestScheme |
openid4vp |
URI scheme for the QR-code deep link |
IssuerChain |
(none) | PEM certificate chain of the trusted PID issuer |
SdJwtFormat |
dc+sd-jwt |
DCQL format id for the SD-JWT VC option |
SdJwtVctValues |
urn:eudi:pid:1, urn:eu.europa.ec.eudi:pid:1 |
Accepted vct values for the SD-JWT VC PID |
SessionTtlMinutes |
30 |
Time-to-live for verification sessions in hosting apps that manage parallel sessions (e.g. the miEUDIverifier web app / REST API) |
All values can be overridden via environment variables (e.g.
VerifierSettings__BackendUrl=…) or CLI arguments, following standard .NET configuration
binding.
What it requests
Only the PID credential, offered to the wallet as either mso_mdoc or dc+sd-jwt
(DCQL credential_sets options), so it can answer with whichever it holds.
Which attributes are requested is configuration: PidClaims sets the default and
PidClaimsByBackend overrides it per backend. Attributes are given in mso_mdoc spelling and
translated for SD-JWT VC, where birth_date becomes birthdate and nationality becomes
nationalities. The default is family_name, given_name and birth_date; place_of_birth,
nationality, issuing_authority and issuing_country are mapped onto IdentityData as well.
Anything else the wallet returns is kept in AdditionalClaims.
Note that a backend fronting a Registration Certificate may not request more than that certificate covers — the wallet aborts otherwise.
License
Apache-2.0 — Copyright © Wolfgang Mitterbucher.
| 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
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.0)
- QRCoder (>= 1.6.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1.4.2 — Make the outcome of the type check visible to callers.
1.4.0 rejects a presentation whose credential type was not requested, but said so only in the log:
the result looked like any other incomplete one. IdentityData.CredentialType is now carried through
the app's JSON responses, and a response from which nothing was accepted is reported as "rejected"
rather than "partial" — the difference between "verified, some attributes missing" and "nothing
verified at all". The data endpoint answers 409 for that state instead of 200.
Library behaviour is unchanged; CredentialType already existed in 1.4.0. Callers that branch on
the status string should handle the new value.
With thanks to Vítor Fonte, who noted the endpoint still answered 200 for rejected presentations
and contributed the regression test for the German PID extension namespace.
1.4.0 — Security: check the credential type of a presentation before trusting it.
Reported by Vitor Fonte, University of Minho.
The library relied on the verifier backend to bind the returned credential to the requested type
and did not re-check that binding. It took any claim named family_name, given_name or birth_date
from any namespace of the response, so a credential whose docType or vct was not the requested PID
type could be reported as a complete, verified identity.
Three changes. Every presentation is now checked against the types the transaction requested —
docType for mso_mdoc, vct for SD-JWT VC — before any attribute is read; this covers all three
response shapes, including documents decoded through the backend utility endpoint. Typed identity
fields are taken only from the PID namespace, so other namespaces — including the German extension
namespace, which shares the docType — contribute to AdditionalClaims alone. Identity data comes
from a single credential and is no longer combined across the credentials of one response.
New overload ExtractIdentityDataAsync(envelope, options, ct): pass the TransactionOptions the
transaction was started with, so the expected types match what was asked for. The existing
two-argument overload still works and falls back to the configured defaults.
IdentityData gained CredentialType, carrying the docType or vct the data actually came from.
Behaviour change worth noting: a response whose credential type cannot be established is now
rejected where earlier versions would have returned an identity. Every rejection is logged with
the type found and the types expected.
1.3.0 — Request a wider PID attribute set, and scope a request to what a Registration
Certificate covers.
New VerifierSettings.PidClaims / PidClaimsByBackend select the PID attributes to request, given in
mso_mdoc spelling; the SD-JWT VC options translate the two names that differ there (birth_date →
birthdate, nationality → nationalities). The default stays at family name, given name and birth
date, so existing configuration is unaffected.
New SdJwtOnlyBackends and TransactionOptions.SdJwtOnly mirror MdocOnly / MdocOnlyBackends for a
backend scoped to an SD-JWT VC certificate; setting both at once throws. New
SdJwtVctValuesByBackend and GermanPidVctValuesByBackend give per-backend vct lists, mirroring how
IntendedUseIds backs IntendedUseId. A blank entry drops that credential option, since .NET
configuration cannot express an empty collection through environment variables.
GermanPidVctValues now also lists urn:eudi:pid:de:1, the identifier the German developer guide
documents for the German PID; the Bundesdruckerei prototype value is kept alongside it.
IdentityData gained PlaceOfBirth, Nationality, IssuingAuthority and IssuingCountry.
SD-JWT VC disclosures are now resolved properly: an object hiding properties behind its own _sd
and an array hiding elements as {"...": digest} are both resolved recursively, matched by the
disclosure digest and honouring _sd_alg. Earlier versions only applied flat [salt, name, value]
disclosures, so a nested place of birth and the nationalities array came through as raw
placeholders. A disclosure the payload never references is still applied by name, as before.
Behaviour change worth noting: claim values that are arrays or objects are no longer dropped
silently — arrays are joined with ", " and objects kept as raw JSON, so AdditionalClaims can now
contain entries that earlier versions discarded.
1.2.0 — Fixes two defaults that made the library unusable out of the box.
BackendUrl now points at https://verifier-backend.eudiw.dev/ (the REST API). It previously
defaulted to https://verifier.eudiw.dev/, which serves the Angular demo UI and answers the API
paths with 405.
New VerifierSettings.IntendedUseId (scalar, default "TEST-01") is sent as intended_use_id when a
transaction carries none of its own — mirroring how ResponseMode backs ResponseModes. Since August
2026 eudiw.dev rejects any request without one (MissingRegistrationCertificate); TEST-01 is the
public test intended use it publishes at GET /ui/intended-uses. A per-backend IntendedUseIds entry
still wins; set IntendedUseId to "" when pointing at a backend of your own.
Both defaults only apply where nothing is configured, so existing configuration is unaffected.
1.1.0 — Multi-backend support: serve several trust ecosystems from one app.
Added VerifierSettings.Backends / DefaultBackend / MdocOnlyBackends / IntendedUseIds /
ResponseModes, the TransactionOptions type, intended_use_id on the init request, and the
German EUDI Wallet (Bundesdruckerei prototype) PID as a further SD-JWT VC option.
Note: InitializeTransactionAsync gained an optional TransactionOptions parameter ahead of
the CancellationToken. Calls passing the token by name or omitting it are unaffected;
positional InitializeTransactionAsync(ct) calls must be updated to (null, ct).