LondonFhirService.Providers.FHIR.STU3.LondonDataService 2.0.1

dotnet add package LondonFhirService.Providers.FHIR.STU3.LondonDataService --version 2.0.1
                    
NuGet\Install-Package LondonFhirService.Providers.FHIR.STU3.LondonDataService -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LondonFhirService.Providers.FHIR.STU3.LondonDataService" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LondonFhirService.Providers.FHIR.STU3.LondonDataService" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="LondonFhirService.Providers.FHIR.STU3.LondonDataService" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LondonFhirService.Providers.FHIR.STU3.LondonDataService --version 2.0.1
                    
#r "nuget: LondonFhirService.Providers.FHIR.STU3.LondonDataService, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LondonFhirService.Providers.FHIR.STU3.LondonDataService@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LondonFhirService.Providers.FHIR.STU3.LondonDataService&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=LondonFhirService.Providers.FHIR.STU3.LondonDataService&version=2.0.1
                    
Install as a Cake Tool

LondonFhirService.Providers.FHIR.STU3.LondonDataService

A FHIR STU3 provider for the London Data Service (LDS) FHIR® Care Connect API.

Creating the provider

public LdsStu3Provider(
    LdsConfigurations configurations,
    IHttpContextAccessor httpContextAccessor,
    ILogger<LdsStu3Provider> logger = null,
    TokenCredential tokenCredential = null)
Parameter Required Description
configurations Yes The LdsConfigurations for the London Data Service.
httpContextAccessor Yes Used to forward the original caller's identity on each request.
logger No When null, a NullLogger<LdsStu3Provider> is used.
tokenCredential No The credential used to get the LDS access token. When null, a DefaultAzureCredential is built from configurations.

Configuration

"LdsConfigurations": {
  "Scope": "api://{lds-app-id}/.default",
  "ManagedIdentityClientId": "",
  "BaseUrl": "https://{lds-host}/",
  "GetStructuredRecordRelativeUrl": "{relative-url}",
  "TimeoutSeconds": 100,
  "CallerAuthorizationHeaderName": "X-Original-Authorization",
  "CallerObjectIdHeaderName": "X-Caller-Oid"
}
Setting Description
Scope The Entra scope requested when getting the LDS access token.
ManagedIdentityClientId Optional client id of a user-assigned managed identity. Only used when no tokenCredential is supplied.
BaseUrl The base address of the LDS API.
GetStructuredRecordRelativeUrl The relative URL of the get structured record operation.
TimeoutSeconds The request timeout in seconds. Defaults to 100.
CallerAuthorizationHeaderName The header used to forward the caller's Authorization value. Defaults to X-Original-Authorization.
CallerObjectIdHeaderName The header used to forward the caller's oid claim. Defaults to X-Caller-Oid.

Authentication

Requests to the LDS API identify the hosting application and, when one is available, the original caller:

  • The hosting application is always sent, as a bearer token for Scope in the Authorization header. The provider gets this token from a TokenCredential and reuses it until 30 seconds before it expires.
  • The original caller is read from the current HttpContext on each request. Their Authorization value is forwarded in the CallerAuthorizationHeaderName header, and their oid claim in the CallerObjectIdHeaderName header. Each header is only added when its value is present, so neither is sent when there is no HttpContext.

Choosing the credential

  • Default (no tokenCredential). The provider builds a DefaultAzureCredential, which tries each credential in its chain in turn and uses the first that succeeds. In an Azure web app with no other credentials configured, such as AZURE_* environment variables, that is expected to be the web app's managed identity. ManagedIdentityClientId only configures the managed identity step: when it is set, that step uses the named user-assigned managed identity instead of the system-assigned one.
  • Supplied tokenCredential. The provider uses the credential you pass in, and ManagedIdentityClientId is ignored.

Local development

There is no managed identity on a developer machine. Rather than setting machine-wide AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET environment variables, which every other application using DefaultAzureCredential would also pick up, supply a credential in Development only. Keep its values in user secrets (dotnet user-secrets). If you keep them in a settings file such as appsettings.Development.json instead, add that file to the host's .gitignore first so the client secret is never committed:

TokenCredential tokenCredential = null;

if (builder.Environment.IsDevelopment())
{
    tokenCredential = new ClientSecretCredential(
        tenantId: builder.Configuration["LdsCredentials:TenantId"],
        clientId: builder.Configuration["LdsCredentials:ClientId"],
        clientSecret: builder.Configuration["LdsCredentials:ClientSecret"]);
}

var ldsStu3Provider = new LdsStu3Provider(
    ldsConfigurations,
    httpContextAccessor,
    ldsLogger,
    tokenCredential);

Outside Development tokenCredential stays null, so the provider falls back to DefaultAzureCredential as before.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.0.1 131 10/23/2026
2.0.0 1,183 9/8/2026
0.2.0 876 7/1/2026
0.1.0 246 7/1/2026

Release 2.0.1.0: no public API changes since 2.0.0.
Documented LdsStu3Provider configuration, authentication and the optional tokenCredential parameter in the README.
Dependency changes: Hl7.Fhir.STU3 6.4.0 to 6.6.0.