Kyvo.Client 1.0.2

dotnet add package Kyvo.Client --version 1.0.2
                    
NuGet\Install-Package Kyvo.Client -Version 1.0.2
                    
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="Kyvo.Client" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kyvo.Client" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Kyvo.Client" />
                    
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 Kyvo.Client --version 1.0.2
                    
#r "nuget: Kyvo.Client, 1.0.2"
                    
#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 Kyvo.Client@1.0.2
                    
#: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=Kyvo.Client&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Kyvo.Client&version=1.0.2
                    
Install as a Cake Tool

Kyvo .NET SDK

The Kyvo .NET SDK helps you build product APIs (BFFs and backend services) that authenticate users via Kyvo OIDC and call the Kyvo REST API v1. It is not intended for the Kyvo admin console.

Cross-language overview and endpoint matrix: ../README.md.

Architecture

The solution is split into small packages so consumers can reference only the pieces they need:

Package Responsibility
Kyvo.AspNetCore JWT validation, IKyvoUserContext, and authorization policies for incoming requests.
Kyvo.Client Typed HTTP client for Kyvo REST v1 — SubscribeAsync, users, tenants, memberships, roles, audit logs.
Kyvo.AspNetCore.TenancyKit Optional bridge to TenancyKit for EF Core multi-tenancy using the tid JWT claim.
Kyvo.Client.Tests Contract tests against the OpenAPI snapshot (not published).

Runtime flow:

Browser SPA (OIDC PKCE)
  -> access token on BFF requests
  -> Kyvo.AspNetCore validates JWT
  -> optional Kyvo.AspNetCore.TenancyKit resolves tenant from tid claim
  -> Kyvo.Client calls Kyvo REST API with the user's token

Install

dotnet add package Kyvo.AspNetCore --version 1.0.2
dotnet add package Kyvo.Client --version 1.0.2
# optional EF multi-tenant:
dotnet add package Kyvo.AspNetCore.TenancyKit --version 1.0.2

Kyvo.AspNetCore

Register JWT authentication and user context in Program.cs:

builder.Services.AddKyvoAuthentication(options =>
{
    options.Authority = builder.Configuration["Kyvo:Authority"]!;
    options.Audience = "kyvo-api";
});

builder.Services.AddAuthorization(options =>
{
    options.AddKyvoPolicies();
});

var app = builder.Build();

app.UseAuthentication();
app.UseAuthorization();

IKyvoUserContext exposes the authenticated user id, tenant id (tid), membership id (mid), tenant roles (trole), and platform roles (prole) from the access token.

Configuration (appsettings.json):

{
  "Kyvo": {
    "Authority": "https://idp.example.com"
  }
}

Kyvo.Client

Register the typed client and call Kyvo from your BFF with the user's access token:

builder.Services.AddKyvoClient(builder.Configuration);
// Kyvo:Authority, optional Kyvo:ApiVersion (default 1.0)

// In a controller or minimal API handler:
var token = KyvoClientServiceCollectionExtensions.GetUserAccessToken(httpContextAccessor);
var result = await kyvo.Auth.SubscribeAsync(
    token!,
    new SubscribeTenantRequest("Acme", "acme"));

POST /auth/subscribe is intentionally server-only — browsers should not call it directly. Use Kyvo.Client from your BFF.

Models live in Kyvo.Client.Models and match the Kyvo OpenAPI contract (e.g. PagedResult.Total, invite bodies use roles).

Kyvo.AspNetCore.TenancyKit

For product APIs with Entity Framework Core, prefer Kyvo.AspNetCore.TenancyKit over manual tid filtering.

Pipeline order:

UseAuthentication -> UseMultiTenancy -> UseAuthorization
Claim Use
tid Tenant id (Guid) — TenancyKit resolver default
mid Membership id — IKyvoUserContext only
trole Tenant roles
prole Platform roles

Example:

builder.Services
    .AddKyvoAuthentication(o => { o.Authority = "https://idp.example"; o.Audience = "kyvo-api"; })
    .AddKyvoTenancyKit<PulseTenantInfo>(options =>
    {
        options.UseMissingTenantBehavior(MissingTenantBehavior.Throw);
        options.UseClaimsTenantResolver("tid");
        options.UseClaimPassthroughTenantStore();
        options.ConfigureEntity<ITenantOwned, Guid>(e => e.TenantId);
    });

app.UseAuthentication();
app.UseMultiTenancy<PulseTenantInfo>();
app.UseAuthorization();

Full integration guide: TENANCYKIT.md.

Verification

dotnet build sdk/dotnet/Kyvo.sln
dotnet test sdk/dotnet/Kyvo.sln
Product 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. 
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
1.0.2 91 6/6/2026
1.0.1 95 6/1/2026
1.0.0 87 6/1/2026