miEUDIverifier.Core
2.0.0
See the version list below for details.
dotnet add package miEUDIverifier.Core --version 2.0.0
NuGet\Install-Package miEUDIverifier.Core -Version 2.0.0
<PackageReference Include="miEUDIverifier.Core" Version="2.0.0" />
<PackageVersion Include="miEUDIverifier.Core" Version="2.0.0" />
<PackageReference Include="miEUDIverifier.Core" />
paket add miEUDIverifier.Core --version 2.0.0
#r "nuget: miEUDIverifier.Core, 2.0.0"
#:package miEUDIverifier.Core@2.0.0
#addin nuget:?package=miEUDIverifier.Core&version=2.0.0
#tool nuget:?package=miEUDIverifier.Core&version=2.0.0
miEUDIverifier.Core
Reusable .NET 8 library to read EUDI Wallet PID identity data over OpenID4VP. It builds the
DCQL request, waits 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.
Two ways to verify, behind one contract (IVerifierEngine):
| In process | Via a verifier backend | |
|---|---|---|
| What verifies | this library, using Tessio.Verifier | the EUDI eudi-srv-verifier-endpoint backend over its REST API |
| You need | your own relying-party access certificate | a reachable backend that holds one |
| Deployment | one process | one process plus a JVM container |
| Revocation | see the caveat below | checked by the backend |
The access certificate is what decides which applies: whatever signs the request objects is the
verifier. If you hold the certificate, you do not need a backend; if your ecosystem's identity
comes from a hosted backend (as the EU reference one at verifier-backend.eudiw.dev does), you do.
Since 2.0.0 this package requires the ASP.NET Core shared framework, because the in-process path hosts the HTTP endpoints a wallet calls. A web application is unaffected. A console or worker host that only uses the backend path still compiles and runs, but needs the ASP.NET Core runtime installed rather than the .NET runtime alone. The minimum QRCoder version also moved to 1.8.1.
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 — via a verifier backend
// 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
Usage — in process, no backend
builder.Services.AddInProcessVerifier(new InProcessVerifierOptions
{
// The address the WALLET reaches, not localhost: it fetches the request object and posts
// the response over the internet.
PublicBaseUrl = "https://verifier.example.com",
// The private key, your access certificate AND its issuing CA. The chain matters, not just
// the leaf: HAIP 1.0 §5 wants the path up to, but excluding, the trust anchor in x5c.
AccessCertificatePath = "/certs/keystore.p12",
AccessCertificatePassword = keystorePassword,
// Verbatim, as your registrar issued it: the wallet verifies a signature over those bytes.
RegistrationCertificate = registrationCertificate,
// The PID issuer's CA certificates. Without them a presentation verifies cryptographically
// and is still refused as untrusted.
IssuerTrustAnchorDirectory = "/trust-anchors",
});
var app = builder.Build();
app.UseForwardedHeaders(); // behind a proxy or tunnel; otherwise response_uri comes out as http
app.MapInProcessVerifier(); // the endpoints the wallet calls
// The same three calls as above, through the same contract.
var verifier = app.Services.GetRequiredService<TessioVerifierEngine>();
var tx = await verifier.InitializeTransactionAsync();
This path does not check revocation. It confirms the PID was validly issued, not that it is still valid, so a revoked PID is accepted. Not a library defect: EAA-6.2.10.1-06.2 requires the status list's chain to be signed by whatever signed the Document Signer, and the German PID test issuer uses sibling CAs under one root, which that rule cannot describe.
CheckRevocationturns it on, and its documentation explains what then happens and what was ruled out. Tell your users what you do and do not check.
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) |
InProcessBackend |
(none) | Names the ecosystem verified in process instead of through a backend. Unset means every path goes over HTTP |
InProcess:* |
(see above) | What the in-process path needs: the two certificates, the trust anchors and the public base URL |
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. The backend path offers it as either mso_mdoc or dc+sd-jwt
(DCQL credential_sets options), so the wallet can answer with whichever it holds. The in-process
path requests mso_mdoc alone, because a deployment there names one credential format.
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.8.1)
- Tessio.Verifier.AspNetCore (>= 0.30.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
2.0.0 — Verify a presentation in process, with no verifier backend.
Whatever signs the request objects is the verifier. Where you hold the relying-party access
certificate yourself, a verifier backend is a container doing work your own process can do — so
this release does it. AddInProcessVerifier() plus MapInProcessVerifier() host the endpoints the
wallet calls (the signed request object and the response callback) and verify the presentation with
Tessio.Verifier, no eudi-srv-verifier-endpoint container and no JVM. Verified with a real
presentation from the German EUDI Wallet on 11 November 2026.
New IVerifierEngine is the contract both paths implement: InitializeTransactionAsync,
WaitForWalletResponseAsync and ExtractIdentityDataAsync. VerifierApiService implements it unchanged,
so callers that use it directly need no edit. Which path a deployment takes is configuration:
VerifierSettings.InProcessBackend names the ecosystem verified in process, and
VerifierSettings.InProcess carries its access certificate, registration certificate and the PID
issuer's trust anchors. Keep the backend path for an ecosystem whose verifier identity you do not
hold — the EU reference one at verifier-backend.eudiw.dev is such a case, which is why both paths
remain.
The in-process path supplies what Tessio.Verifier 0.30.2 cannot yet: a request object carrying the
registration certificate in verifier_info (format "registration_cert", a JWT whose typ header is
rc-wrp+jwt), and an x5c holding the access certificate AND its path up to, but excluding, the trust
anchor, as HAIP 1.0 section 5 and ETSI TS 119 472-2 clause 6.4.2 require.
BREAKING — the ASP.NET Core shared framework is now required. The package hosts HTTP endpoints, so
it references Microsoft.AspNetCore.App. A web application is unaffected. A console or worker host
that only consumes the backend path still compiles and runs, but needs the ASP.NET Core runtime
present rather than the .NET runtime alone; a self-contained publish grows accordingly.
BREAKING — the minimum QRCoder version moves from 1.6.0 to 1.8.1, which Tessio.Verifier requires.
Known limitation, deliberate and documented: the in-process path does NOT check revocation, so it
confirms a PID was validly issued rather than that it is still valid. Set
InProcessVerifierOptions.CheckRevocation to turn it on; against the German PID test issuer every
presentation then fails status_invalid, because EAA-6.2.10.1-06.2 requires the status list's chain
to be signed by whatever signed the Document Signer and that issuer uses sibling CAs under one
root. No trust anchor configuration changes that. The backend path checks revocation, and a
deployment that needs the guarantee should use it. Tell your users what you do and do not check.
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).