Skip to main content

.NET (Locksmith.Sdk)

dotnet add package Locksmith.Sdk

.NET 8.0+. Responses surface as JsonElement trees for the API’s camelCase JSON.

Quick start

using System.Text.Json;
using Locksmith;

await using var client = new LocksmithClient(Environment.GetEnvironmentVariable("LOCKSMITH_API_KEY")!);

JsonElement bundle = await client.SignInAsync("user@example.com", "secure-password");
string access = bundle.GetProperty("accessToken").GetString()!;

JsonElement user = await client.GetUserAsync(access);

Local JWT verification

var jwt = LocksmithClient.VerifyToken(accessToken, publicKeyPem);
NuGet

Package ID and publishing follow your release pipeline; install command matches the intended public ID.

API reference