![]() |
VOOZH | about |
dotnet add package Udap.Metadata.Server --version 0.7.10
NuGet\Install-Package Udap.Metadata.Server -Version 0.7.10
<PackageReference Include="Udap.Metadata.Server" Version="0.7.10" />
<PackageVersion Include="Udap.Metadata.Server" Version="0.7.10" />Directory.Packages.props
<PackageReference Include="Udap.Metadata.Server" />Project file
paket add Udap.Metadata.Server --version 0.7.10
#r "nuget: Udap.Metadata.Server, 0.7.10"
#:package Udap.Metadata.Server@0.7.10
#addin nuget:?package=Udap.Metadata.Server&version=0.7.10Install as a Cake Addin
#tool nuget:?package=Udap.Metadata.Server&version=0.7.10Install as a Cake Tool
This package includes a MVC controller, an extension method to load, and an implementation if ICertificateStore as FileCertificateStore so you can get a sample up and running quickly.
Program.cs could be as easy as this example.
using Udap.Common;
using Udap.Metadata.Server;
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddControllers()
.UseUdapMetaDataServer(builder.Configuration);
builder.Services.AddSingleton<ICertificateStore, MyCustomCertificateStore>();
Below is a full example. Alternatively the is another great way to learn how to use Udap.Metadata.Server.
Add this package to your FHIR® server or any web api server to.
dotnet new sln -o WebApiProject1
cd WebApiProject1
dotnet new webapi -o WebApi1 -minimal
dotnet sln add ./WebApi1/WebApi1.csproj
cd WebApi1
dotnet add package Udap.Metadata.Server
Or until a first release use the --prerelease tag.
dotnet add package Udap.Metadata.Server --prerelease
dotnet build
Add the UseUdapMetaDataServer service extension to program.cs
builder.Services
.AddControllers()
.AddUdapMetaDataServer(builder.Configuration);
By default, AddUdapMetaDataServer registers the default IUdapMetadataOptionsProvider implmentation of UdapMetadataOptionsProvider. UdapMetadataOptionsProvider finds the UdapMetadataOptionsFile in 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" ],
//"TokenEndpointAuthSigningAlgValuesSupported": [ "RS256", "RS384", "ES256", "ES384" ],
//"RegistrationEndpointJwtSigningAlgValuesSupported": [ "RS256", "RS384", "ES256", "ES384" ],
"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"
}
}
]
}
The UdapMetadataOptions class defines the configurable properties for UDAP metadata, as seen above in udap.metadata.options.json.
["1"])["udap_dcr", "udap_authn"])You can add additional custom properties to your udap.metadata.options.json file. Any extra properties not explicitly defined above will be loaded and made available in the published metadata via the ExtensionData dictionary. This allows for flexible extension of the metadata without modifying the core model.
The settings in udap.metadata.options.json will match the IssuedCerts settings in UdapFileCertStoreManifest settings of the appsettings.json. See below.
To serve UDAP metadata, certificates will be loaded through an implementation of ICertificatStore. Below is the built-in file-based implementation for lab experiments.
// UDAP CertStore
builder.Services.Configure<UdapFileCertStoreManifest>(builder.Configuration.GetSection("UdapFileCertStoreManifest"));
builder.Services.AddSingleton<ICertificateStore, FileCertificateStore>();
To continue this example, copy the following files from the Udap.PKI.Generator test project output to the following directory structure at the root of the WebApi1 project. Ensure each file's "Copy to Output Directory" is set to copy.
Add configuration to AppSettings to point to the certificates.
Note From AppSettings
UdapMetadataOptions:UdapMetadataConfigs:Community value is the link to UdapFileCertStoreManifest:ResourceServers:Communities.Name. In this example the community is identified by the name http://localhost. Community names are constrained as a URI
/*
Normally put someplace safer like secrets.json or secured database
and add this to Program.cs.
*/
"UdapFileCertStoreManifest": {
"Communities": [
{
"Name": "http://localhost",
"IssuedCerts": [
{
"FilePath": "CertStore/issued/weatherApiClientLocalhostCert.pfx",
"Password": "udap-test"
}
]
}
]
}
dotnet run
Navigate to http://localhost:5079/.well-known/udap or http://localhost:5079/swagger.
At this point a success would result in a result similar to the following json. Ensure the signed_metadata property contains a signed JWT token.
<details open><summary><a>View Metadata</></summary>
{
"udap_versions_supported": [
"1"
],
"udap_profiles_supported": [
"udap_dcr",
"udap_authn",
"udap_authz"
],
"udap_authorization_extensions_supported": [
"hl7-b2b"
],
"udap_authorization_extensions_required": [
"hl7-b2b"
],
"udap_certifications_supported": [
"http://MyUdapCertification",
"http://MyUdapCertification2"
],
"udap_certifications_required": [
"http://MyUdapCertification"
],
"grant_types_supported": [
"client_credentials"
],
"scopes_supported": [
"openid",
"system/Patient.read",
"system/AllergyIntolerance.read",
"system/Procedures.read",
"system/Observation.read"
],
"authorization_endpoint": "https://securedcontrols.net/connect/authorize",
"token_endpoint": "https://securedcontrols.net/connect/token",
"token_endpoint_auth_methods_supported": [
"private_key_jwt"
],
"token_endpoint_auth_signing_alg_values_supported": [
"RS256"
],
"registration_endpoint": "https://securedcontrols.net/connect/register",
"registration_endpoint_jwt_signing_alg_values_supported": [
"RS256"
],
"signed_metadata": "eyJhbGciOiJSUzI1NiIsIng1YyI6WyJNSUlGR3pDQ0JBT2dBd0lCQWdJSUZSVVJqcWdlTkdNd0RRWUpLb1pJaHZjTkFRRUxCUUF3Z2JNeEN6QUpCZ05WQkFZVEFsVlRNUk13RVFZRFZRUUlEQXBEWVd4cFptOXlibWxoTVJJd0VBWURWUVFIREFsVFlXNGdSR2xsWjI4eEV6QVJCZ05WQkFvTUNrVk5VaUJFYVhKbFkzUXhQekE5QmdOVkJBc01ObFJsYzNRZ1VFdEpJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNUlDaGpaWEowY3k1bGJYSmthWEpsWTNRdVkyOXRLVEVsTUNNR0ExVUVBd3djUlUxU0lFUnBjbVZqZENCVVpYTjBJRU5zYVdWdWRDQlRkV0pEUVRBZUZ3MHlNakE1TVRVeU1ETXpOVEphRncweU16QTVN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VONzFxeHFBcllLdEI3OUdmRkVGQVFaUkUiLCJhdXRob3JpemF0aW9uX2VuZHBvaW50IjoiaHR0cHM6Ly9zZWN1cmVkY29udHJvbHMubmV0L2Nvbm5lY3QvYXV0aG9yaXplIiwidG9rZW5fZW5kcG9pbnQiOiJodHRwczovL3NlY3VyZWRjb250cm9scy5uZXQvY29ubmVjdC90b2tlbiIsInJlZ2lzdHJhdGlvbl9lbmRwb2ludCI6Imh0dHBzOi8vc2VjdXJlZGNvbnRyb2xzLm5ldC9jb25uZWN0L3JlZ2lzdGVyIn0.Y9qWVQFs9HXWipN8YDrH7gf89FoA0V7f3p9vqc6bPuqrcI0B6wgqZ2ZC3FYi46nGvpe6G_H20edXYR7zIHqcXqhtjfYNmCYoH-ceVwvq6kCAm0c4v8BXN23SM1Eh72_481Bbf7PidHUzcAIOn7fJ9DAk-LiVsT9aa7TD2Aj11cLC5ZiuoHyLCOaf6sjK-yX707ov313TEQREgLbSnl-YTwbIgmm_h3fW4eSZH2eszdr3a3Q8BWKKVBphWos5TvQ77WsYfTt60JfFHEXO8Psq7n4bGm2ZcNApzoa9PIuimmzeN8vjyaLBu7lDi93cc9jKphYz3KpLh_-8ruHF2HqmNw"
}
</details> <br/>
FhirLabs UdapEd Tool | Discovery | Registration | B2B | Patient Match | National Directory
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. UDAP Draft Specifications are referenced and displayed in parts of this source code to document specification implementation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Udap.Metadata.Server:
| Package | Downloads |
|---|---|
|
Udap.Metadata.Vonk.Server
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.8.5 | 95 | 6/16/2026 |
| 0.8.4 | 99 | 5/30/2026 |
| 0.8.3 | 101 | 5/29/2026 |
| 0.8.2 | 115 | 5/22/2026 |
| 0.8.1 | 103 | 5/20/2026 |
| 0.8.0 | 118 | 5/15/2026 |
| 0.7.13 | 105 | 5/15/2026 |
| 0.7.12 | 290 | 4/1/2026 |
| 0.7.11 | 114 | 3/31/2026 |
| 0.7.10 | 114 | 3/31/2026 |
| 0.7.9 | 122 | 3/31/2026 |
| 0.7.8 | 116 | 3/30/2026 |
| 0.7.7 | 117 | 3/30/2026 |
| 0.7.6 | 118 | 3/30/2026 |
| 0.7.5 | 122 | 3/30/2026 |
| 0.7.4 | 116 | 3/29/2026 |
| 0.7.3 | 123 | 3/29/2026 |
| 0.7.2 | 123 | 3/28/2026 |
| 0.7.1 | 117 | 3/23/2026 |
| 0.7.0 | 117 | 3/22/2026 |