YubiHsmSharp.Client
2.7.3-alpha
This is a prerelease version of YubiHsmSharp.Client.
dotnet add package YubiHsmSharp.Client --version 2.7.3-alpha
NuGet\Install-Package YubiHsmSharp.Client -Version 2.7.3-alpha
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="YubiHsmSharp.Client" Version="2.7.3-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YubiHsmSharp.Client" Version="2.7.3-alpha" />
<PackageReference Include="YubiHsmSharp.Client" />
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 YubiHsmSharp.Client --version 2.7.3-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: YubiHsmSharp.Client, 2.7.3-alpha"
#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 YubiHsmSharp.Client@2.7.3-alpha
#: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=YubiHsmSharp.Client&version=2.7.3-alpha&prerelease
#tool nuget:?package=YubiHsmSharp.Client&version=2.7.3-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
YubiHsmSharp.Client
A .NET Aspire Client Integration that automatically configures a YubiHSM 2 client.
Registrations
The extension method AddYubiHsmClient registers the following types:
YubiModule- SingletonYubiConnector- Scoped, pre-configured with URLYubiSession- Scoped, pre-configured with Authentication Key ID and Password
The method also registers the following internal types, used to enhance observability, but not exposed to the application:
- A health check that verifies connectivity and authentication for the corresponding
YubiSession, unlessDisableHealthChecks=true. - A background service that pulls metrics and logs from the corresponding
YubiSession, unless bothDisableMetrics=trueandDisableDeviceLogs=true.
Example
The following code registers a YubiSession that is configured with a URL, Authentication Key ID, and Password retrieved from app configuration.
var builder = WebApplication.CreateBuilder(args);
builder.AddYubiHsmClient("yubihsm");
var app = builder.Build();
app.MapHealthChecks("/healthz");
app.MapPost("/blink", async (YubiSession session, int seconds) => {
session.BlinkDevice(TimeSpan.FromSeconds(seconds));
return Results.NoContent();
});
app.Run();
Demo
See YubiHsmSharp.Demo for a demo of this library.
| Product | Versions 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.
-
net10.0
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- OpenTelemetry.Api (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.7.0)
- YubiHsmSharp (>= 2.7.3-alpha)
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.7.3-alpha | 0 | 6/14/2026 |