Concierge.Auth.Client.Tokens 1.0.0

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

Concierge.Auth.Client.Tokens

Obtains typ: "client" JWTs from POST /api/v1/auth/token (contract §11.3) and attaches them to outbound HTTP calls. Counterpart to Concierge.Auth.Client.AuthGuard's JWT validation lane — AuthGuard validates a client JWT someone else issued; this package is how a client service obtains one. Not the deprecated human JWT pair in Concierge.Auth.Client.Sessions/Tokens/JwtLaneCredential.cs.

Install and register

services.AddConciergeAuthClient(configuration, db => db.UseNpgsql(cs, npgsql =>
    npgsql.MigrationsHistoryTable("__EFMigrationsHistory", "concierge"))); // base — required first
services.AddConciergeSecretManagement(configuration);                        // Secrets — required first
services.AddConciergeAuthClientTokens(configuration);                        // binds "Concierge:AuthClient:ClientTokens"

AddConciergeAuthClientTokens fails closed at this call, synchronously, if AddConciergeSecretManagement(...) has not already been registered — minting authenticates with this service's own credential from IClientCredentialStore.

Attach to an outbound HttpClient

services.AddHttpClient<MyDownstreamClient>()
    .AddHttpMessageHandler<ConciergeClientTokenHandler>();

ConciergeClientTokenHandler is registered as transient by AddConciergeAuthClientTokens — use AddHttpMessageHandler<ConciergeClientTokenHandler>() (not a manual new).

IClientTokenProvider

var token = await clientTokenProvider.GetTokenAsync(cancellationToken);

In-memory cache with single-flight refresh. A token is served while now < expiry - RefreshSkew (default 60 seconds). Failed mints are not cached — the next call retries. No refresh token: a machine holding a durable secret re-mints.

Failure codes:

Code When
CLIENT_AUTH_FAILED AuthService denied the mint (every denial reason collapses here)
CLIENT_AUTH_UNAVAILABLE AuthService unreachable, unexpected status, or malformed 200 body

Credential-store failures propagate their own Error from IClientCredentialStore.

Configuration

Member Section Default
ConciergeAuthClientOptions.AuthServiceBaseUrl Concierge:AuthClient required (base package)
ConciergeAuthClientOptions.ClientKey Concierge:AuthClient required (base package)
ConciergeClientTokensOptions.RefreshSkew Concierge:AuthClient:ClientTokens 60 seconds

ConciergeClientTokensOptions is a fourth similarly-named options type — do not confuse it with ConciergeTokenValidationOptions (AuthGuard, validating an incoming JWT) or ConciergeSessionsOptions (Sessions, obtaining a human session).

ConciergeClientTokenHandler retry semantics

Sets Authorization: Bearer <token>. On a downstream 401, invalidates the cache and retries exactly once with a freshly minted token. A second 401 propagates unchanged. Non-401 failures are never swallowed.

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 (1)

Showing the top 1 NuGet packages that depend on Concierge.Auth.Client.Tokens:

Package Downloads
Concierge.Auth.Client.Profiles

User profile read/write against AuthService (contract §10.7) plus a thiso.events consumer that mirrors profile and status changes into the client's own user entity, for the THISO Concierge.* client SDK.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 451 8/24/2026