Warden.Sdk 0.2.0

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

Warden SDK

The Warden SDK activates license keys and validates offline access for your app.

https://authwarden.app/docs

Install

dotnet add package Warden.Sdk

Quickstart

using Warden.Sdk.Clients;

// Windows-only (DPAPI)
var client = LicenseClient.CreateDefaultForLicense("YOUR-LICENSE-KEY");

// First run (online)
var activation = await client.ActivateAsync("YOUR-LICENSE-KEY");
if (!activation.IsSuccess)
{
    // show activation.Message to user
    return;
}

// Every startup (offline-first)
var status = await client.ValidateAsync();
if (!status.IsValid)
{
    // show error to user
}

Offline storage

  • Windows: ProtectedFileOfflineAccessStore (DPAPI, Windows-only)
  • Cross-platform: AesFileOfflineAccessStore (AES-GCM)

Manual storage examples:

using Warden.Sdk.Clients;
using Warden.Sdk.Storage;

// Windows (DPAPI)
var store = new ProtectedFileOfflineAccessStore();
var client = LicenseClient.CreateDefault(null, store);

// Cross-platform (AES-GCM)
var store = new AesFileOfflineAccessStore("your-passphrase");
var client = LicenseClient.CreateDefault(null, store);

Multiple products on one machine

Each license key gets its own encrypted store automatically.

Windows-only (DPAPI):

using Warden.Sdk.Clients;

var client = LicenseClient.CreateDefaultForLicense("LICENSE-KEY-A");

Cross-platform (Windows/macOS/Linux):

using Warden.Sdk.Clients;

var client = LicenseClient.CreateDefaultForLicense("LICENSE-KEY-B", "your-passphrase");

Remember last license key (Windows + cross-platform)

If you want to avoid prompting every launch, the SDK includes a cache helper.

Windows (DPAPI):

using Warden.Sdk.Clients;
using Warden.Sdk.Utilities;

var cached = LicenseKeyCache.LoadLastLicenseKey();
if (!string.IsNullOrWhiteSpace(cached))
{
    var client = LicenseClient.CreateDefaultForLicense(cached);
}

// After a successful activation:
LicenseKeyCache.SaveLastLicenseKey("YOUR-LICENSE-KEY");

Cross-platform (AES-GCM):

using Warden.Sdk.Clients;
using Warden.Sdk.Utilities;

var cached = LicenseKeyCache.LoadLastLicenseKey("your-passphrase");
if (!string.IsNullOrWhiteSpace(cached))
{
    var client = LicenseClient.CreateDefaultForLicense(cached, "your-passphrase");
}

LicenseKeyCache.SaveLastLicenseKey("YOUR-LICENSE-KEY", "your-passphrase");

Air-gapped activation

using Warden.Sdk.Clients;

var json = File.ReadAllText("warden-offline-KEY.json");
await client.LoadOfflineLicenseAsync(json);
var status = await client.ValidateAsync();

Notes

  • Client apps should not embed API keys.
  • Use license keys for activation and activation tokens for refresh.
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
0.2.0 160 2/9/2026
0.1.9 117 2/4/2026
0.1.8 119 2/3/2026
0.1.7 118 2/3/2026
0.1.5 122 2/3/2026
0.1.1 120 2/3/2026
0.1.0 117 2/3/2026