Udap.Metadata.Server
0.8.0
dotnet add package Udap.Metadata.Server --version 0.8.0
NuGet\Install-Package Udap.Metadata.Server -Version 0.8.0
<PackageReference Include="Udap.Metadata.Server" Version="0.8.0" />
<PackageVersion Include="Udap.Metadata.Server" Version="0.8.0" />
<PackageReference Include="Udap.Metadata.Server" />
paket add Udap.Metadata.Server --version 0.8.0
#r "nuget: Udap.Metadata.Server, 0.8.0"
#:package Udap.Metadata.Server@0.8.0
#addin nuget:?package=Udap.Metadata.Server&version=0.8.0
#tool nuget:?package=Udap.Metadata.Server&version=0.8.0
Udap.Metadata.Server
📦 Nuget Package: Udap.Metadata.Server
This package provides the .well-known/udap metadata endpoint for FHIR resource servers and other UDAP-secured APIs. It includes an extension method for service registration, middleware for dynamic metadata serving, and a built-in FileCertificateStore implementation of ICertificateStore.
For multi-domain metadata support (serving signed metadata for multiple domains within a single community), see Multi-Domain Metadata Support.
Quick Start
Program.cs can be as simple as:
using Udap.Metadata.Server;
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddControllers()
.AddUdapMetadataServer(builder.Configuration);
var app = builder.Build();
app.UseUdapMetadataServer();
app.MapControllers();
app.Run();
You can provide your own certificate store implementation:
builder.Services.AddSingleton<ICertificateStore, MyCustomCertificateStore>();
Setup
dotnet add package Udap.Metadata.Server
Add the AddUdapMetadataServer service extension and UseUdapMetadataServer middleware to Program.cs:
builder.Services
.AddControllers()
.AddUdapMetadataServer(builder.Configuration);
// ...
// Place before UseRouting() and UseAuthentication() so metadata
// requests are handled anonymously
app.UseUdapMetadataServer();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
By default, AddUdapMetadataServer registers UdapMetadataOptionsProvider which reads the metadata options file path from AppSettings:
"UdapMetadataOptionsFile": "udap.metadata.options.json"
udap.metadata.options.json:
{
"UdapVersionsSupported": [ "1" ],
"UdapProfilesSupported": [ "udap_dcr", "udap_authn", "udap_authz", "udap_to" ],
"ScopesSupported": [ "openid", "system/*.read", "user/*.read", "patient/*.read" ],
"UdapCertificationsSupported": [ "http://MyUdapCertification", "http://MyUdapCertification2" ],
"UdapCertificationsRequired": [ "http://MyUdapCertification" ],
"GrantTypesSupported": [ "authorization_code", "refresh_token", "client_credentials" ],
"UdapMetadataConfigs": [
{
"Community": "http://localhost",
"SignedMetadataConfig": {
"AuthorizationEndpoint": "https://securedcontrols.net:5001/connect/authorize",
"TokenEndpoint": "https://securedcontrols.net:5001/connect/token",
"RegistrationEndpoint": "https://securedcontrols.net:5001/connect/register"
}
}
]
}
UDAP Metadata Options
The UdapMetadataOptions class defines the configurable properties:
- UdapVersionsSupported: Array of supported UDAP versions (e.g.,
["1"]) - UdapProfilesSupported: Array of supported UDAP profiles (e.g.,
["udap_dcr", "udap_authn"]) - UdapAuthorizationExtensionsSupported: Array of supported authorization extensions (e.g.,
["hl7-b2b", "tefca-ias"]) - UdapAuthorizationExtensionsRequired: Array of required authorization extensions
- UdapCertificationsSupported: Array of supported certifications
- UdapCertificationsRequired: Array of required certifications
- GrantTypesSupported: Array of supported OAuth2 grant types
- ScopesSupported: Array of supported scopes
- TokenEndpointAuthSigningAlgValuesSupported: Array of supported signing algorithms for the token endpoint
- RegistrationEndpointJwtSigningAlgValuesSupported: Array of supported signing algorithms for the registration endpoint
- UdapMetadataConfigs: Array of community-specific metadata configurations
- CertificateResolveTimeoutSeconds: Timeout in seconds for certificate resolution (default: 10)
Extending Metadata
Any extra properties in your udap.metadata.options.json file not listed above will be loaded and made available in the published metadata via the ExtensionData dictionary.
Certificate Store
To serve UDAP metadata, certificates are loaded through an implementation of ICertificateStore. Below is the built-in file-based implementation:
builder.Services.Configure<UdapFileCertStoreManifest>(builder.Configuration.GetSection("UdapFileCertStoreManifest"));
builder.Services.AddSingleton<ICertificateStore, FileCertificateStore>();
Configure certificate paths in appsettings.json. The community name links UdapMetadataConfigs to UdapFileCertStoreManifest. Community names are constrained as a URI.
"UdapFileCertStoreManifest": {
"Communities": [
{
"Name": "http://localhost",
"IssuedCerts": [
{
"FilePath": "CertStore/issued/weatherApiClientLocalhostCert.pfx",
"Password": "udap-test"
}
]
}
]
}
Examples
- FHIR® is the registered trademark of HL7 and is used with the permission of HL7. Use of the FHIR trademark does not constitute endorsement of the contents of this repository by HL7.
- UDAP® and the UDAP gear logo, ecosystem gears, and green lock designs are trademarks of UDAP.org.
| 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 is compatible. 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 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
- BouncyCastle.Cryptography (>= 2.6.2)
- Duende.IdentityModel (>= 8.1.0)
- Hl7.Fhir.Base (>= 5.13.3)
- Hl7.Fhir.R4B (>= 5.13.3)
- Hl7.Fhir.Specification.R4B (>= 5.13.3)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.18.0)
- System.IdentityModel.Tokens.Jwt (>= 8.18.0)
- Udap.Common (>= 0.8.0)
- Udap.Model (>= 0.8.0)
- ZiggyCreatures.FusionCache (>= 2.6.0)
-
net8.0
- BouncyCastle.Cryptography (>= 2.6.2)
- Duende.IdentityModel (>= 8.1.0)
- Hl7.Fhir.Base (>= 5.13.3)
- Hl7.Fhir.R4B (>= 5.13.3)
- Hl7.Fhir.Specification.R4B (>= 5.13.3)
- Microsoft.Bcl.Memory (>= 10.0.8)
- Microsoft.Extensions.Configuration (>= 10.0.8)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.8)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.8)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.18.0)
- System.IdentityModel.Tokens.Jwt (>= 8.18.0)
- Udap.Common (>= 0.8.0)
- Udap.Model (>= 0.8.0)
- ZiggyCreatures.FusionCache (>= 2.6.0)
-
net9.0
- BouncyCastle.Cryptography (>= 2.6.2)
- Duende.IdentityModel (>= 8.1.0)
- Hl7.Fhir.Base (>= 5.13.3)
- Hl7.Fhir.R4B (>= 5.13.3)
- Hl7.Fhir.Specification.R4B (>= 5.13.3)
- Microsoft.Bcl.Memory (>= 10.0.8)
- Microsoft.Extensions.Configuration (>= 10.0.8)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.8)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)
- Microsoft.Extensions.Options (>= 10.0.8)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.8)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.18.0)
- System.IdentityModel.Tokens.Jwt (>= 8.18.0)
- Udap.Common (>= 0.8.0)
- Udap.Model (>= 0.8.0)
- ZiggyCreatures.FusionCache (>= 2.6.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Udap.Metadata.Server:
| Package | Downloads |
|---|---|
|
Udap.Metadata.Vonk.Server
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.8.0 | 0 | 5/15/2026 |
| 0.7.13 | 0 | 5/15/2026 |
| 0.7.12 | 265 | 4/1/2026 |
| 0.7.11 | 100 | 3/31/2026 |
| 0.7.10 | 99 | 3/31/2026 |
| 0.7.9 | 109 | 3/31/2026 |
| 0.7.8 | 104 | 3/30/2026 |
| 0.7.7 | 103 | 3/30/2026 |
| 0.7.6 | 99 | 3/30/2026 |
| 0.7.5 | 105 | 3/30/2026 |
| 0.7.4 | 101 | 3/29/2026 |
| 0.7.3 | 105 | 3/29/2026 |
| 0.7.2 | 112 | 3/28/2026 |
| 0.7.1 | 100 | 3/23/2026 |
| 0.7.0 | 102 | 3/22/2026 |
| 0.6.16 | 105 | 3/22/2026 |
| 0.6.14 | 121 | 3/16/2026 |
| 0.6.13 | 104 | 3/15/2026 |
| 0.6.12 | 109 | 3/14/2026 |
| 0.6.11 | 106 | 3/14/2026 |