Axowl.Sdk.Identity.Client 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Axowl.Sdk.Identity.Client --version 0.2.1
                    
NuGet\Install-Package Axowl.Sdk.Identity.Client -Version 0.2.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="Axowl.Sdk.Identity.Client" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Axowl.Sdk.Identity.Client" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Axowl.Sdk.Identity.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 Axowl.Sdk.Identity.Client --version 0.2.1
                    
#r "nuget: Axowl.Sdk.Identity.Client, 0.2.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 Axowl.Sdk.Identity.Client@0.2.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=Axowl.Sdk.Identity.Client&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Axowl.Sdk.Identity.Client&version=0.2.1
                    
Install as a Cake Tool

Axowl.Sdk.Identity.Client

Axowl SDK for B2B consumer apps to verify Axowl-issued EndUser JWTs and check permissions. Built on Axowl's v22 Snapshot Architecture (yes/no permission system).

Install

dotnet add package Axowl.Sdk.Identity.Client

Quickstart

using Axowl.Sdk.Identity.Abstractions.Contracts;
using Axowl.Sdk.Identity.Client;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddAxowlIdentity(opts =>
{
    opts.OrganizationSlug = "bullmark";              // your Axowl Org slug
    opts.Audience         = "app_bullmark_main";     // your ApplicationKey
    opts.ApiKey           = builder.Configuration["Axowl:ApiKey"]!;
    opts.Transport        = TransportMode.GrpcWithFallback;
    // Endpoints default to testapi/testgrpc.axowl.com — the environment Axowl serves today.
    // Set these only to point somewhere else:
    // opts.Authority         = "https://testapi.axowl.com";
    // opts.ServerAddress     = "https://testgrpc.axowl.com";
    // opts.RestServerAddress = "https://testapi.axowl.com";
});

builder.Services.AddAuthorization();

var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();

// Protected endpoint — JWT verified via Axowl's JWKS, no server roundtrip
app.MapGet("/wallet", (HttpContext ctx) =>
{
    var p = ctx.User.GetAxowlPrincipal();
    return Results.Ok(new { user = p?.Email, org = p?.OrganizationId });
}).RequireAuthorization();

// Permission-gated endpoint — JWT claims fast-path
app.MapGet("/admin/billing",
    [RequirePermission("billing.admin")]
    () => Results.Ok("Sensitive billing data"));

// Server-authoritative check — for cases where JWT claims may be stale
app.MapPost("/admin/wipe",
    [RequirePermission("system.admin", ServerCheck = true)]
    () => Results.Ok("Wiped"));

app.Run();

Two verification modes

Mode Server roundtrip When
JWT claims (default) ❌ no JWKS signature verified once + claims read in-process. Fast (~0.1ms). Default for [RequirePermission].
Server-authoritative ✅ yes (Introspect / CheckPermission gRPC) Catches revocations after JWT issue. ~50ms. Opt in via ServerCheck = true or call IAxowlIdentityClient directly.

Direct API client

For non-attribute use (programmatic checks, background jobs, audit):

public class WalletService
{
    private readonly IAxowlIdentityClient _identity;
    public WalletService(IAxowlIdentityClient identity) => _identity = identity;

    public async Task<bool> CanUserWithdrawAsync(string jwtToken, CancellationToken ct)
    {
        var result = await _identity.CheckPermissionAsync(jwtToken, "wallet.withdraw", ct);
        return result.Granted;
    }

    public async Task<AxowlPrincipal?> ResolveAsync(string jwtToken, CancellationToken ct)
    {
        var introspect = await _identity.IntrospectAsync(jwtToken, ct);
        return introspect.Active ? introspect.Principal : null;
    }
}

Permission scope format

Mirrors Axowl's v22 ResolvedScope:

Form Example Matches
Exact "wallet.read" "wallet.read" only
Suffix wildcard "wallet.*" "wallet.read", "wallet.write", "wallet.X"
Full wildcard "*" anything (admin-style)
With variables "server.create:region=kr" exact incl. variables

Variables (:k=v) are matched as part of the resolved string. SDK's client-side wildcard handles prefix matching; full variable-aware evaluation requires ServerCheck = true.

Configuration reference

public sealed class AxowlIdentityClientOptions
{
    // JwtBearer / JWKS — required
    public string Authority         { get; set; } = "https://testapi.axowl.com";
    public string OrganizationSlug  { get; set; } = "";   // required
    public string Audience          { get; set; } = "";   // required (your ApplicationKey)
    public string Issuer            { get; set; } = "axowl";

    // gRPC / REST IdentityService — optional, for server-side checks
    public string ServerAddress     { get; set; } = "https://testgrpc.axowl.com";
    public string RestServerAddress { get; set; } = "https://testapi.axowl.com";
    public string ApiKey            { get; set; } = "";   // required when using Introspect / CheckPermission
    public TransportMode Transport  { get; set; } = TransportMode.Grpc;
}
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
0.2.2 39 9/26/2026
0.2.1 49 9/26/2026