Concierge.Auth.Client
1.1.1
dotnet add package Concierge.Auth.Client --version 1.1.1
NuGet\Install-Package Concierge.Auth.Client -Version 1.1.1
<PackageReference Include="Concierge.Auth.Client" Version="1.1.1" />
<PackageVersion Include="Concierge.Auth.Client" Version="1.1.1" />
<PackageReference Include="Concierge.Auth.Client" />
paket add Concierge.Auth.Client --version 1.1.1
#r "nuget: Concierge.Auth.Client, 1.1.1"
#:package Concierge.Auth.Client@1.1.1
#addin nuget:?package=Concierge.Auth.Client&version=1.1.1
#tool nuget:?package=Concierge.Auth.Client&version=1.1.1
Concierge.Auth.Client
Base package of the THISO Concierge.* .NET client SDK for AuthService. Owns configuration,
DI registration, EF Core persistence, and the AES-GCM at-rest encryption primitive. Makes
no HTTP calls to AuthService — that lives in the extension packages (Concierge.Auth.Client.Secrets,
.Keys, .AspNetCore, .Profiles) built on top of this one.
This package ships no EF Core provider
Concierge.Auth.Client depends only on Microsoft.EntityFrameworkCore and
Microsoft.EntityFrameworkCore.Relational — never Npgsql, never any other provider package.
You, the consumer, are responsible for all four of the following:
- Install your own EF Core provider (
Npgsql.EntityFrameworkCore.PostgreSQL,Microsoft.EntityFrameworkCore.SqlServer, etc.) in your own project. - Set
MigrationsHistoryTable("__EFMigrationsHistory", "concierge")in your provider configuration. This package cannot set it for you (that method lives on the provider-typed options builder). Startup throws if you don't — EF Core defaults every context topublic.__EFMigrationsHistory, and if your ownDbContextshares this database, each context would see the other's applied migrations as unknown rows. - Set
MigrationsAssembly(...)to your own assembly. Without this,dotnet ef migrations addtargetsConcierge.Auth.Client's assembly, which you cannot write to (and which this package does not ship migrations from in the first place — see below). - Run your own
dotnet ef migrations add/dotnet ef database updateagainstConciergeAuthDbContext. This package never creates or migrates its schema unbidden.
Install and register
services.AddConciergeAuthClient(
configuration, // binds "Concierge:AuthClient": AuthServiceBaseUrl, ClientKey, EncryptionKey
db => db.UseNpgsql(
"Host=localhost;Port=5432;Database=thiso_platform;Username=...;Password=...",
npgsql => npgsql.MigrationsHistoryTable("__EFMigrationsHistory", "concierge")));
// or, options configured programmatically:
services.AddConciergeAuthClient(
options =>
{
options.AuthServiceBaseUrl = new Uri("https://auth.thiso.vn");
options.ClientKey = "platform-service";
options.EncryptionKey = "<base64 of exactly 32 bytes>";
},
db => db.UseNpgsql(
"Host=localhost;Port=5432;Database=thiso_platform;Username=...;Password=...",
npgsql => npgsql.MigrationsHistoryTable("__EFMigrationsHistory", "concierge")));
All three options are required; a missing or malformed EncryptionKey throws at host
startup (fail-closed, no default/fallback/generated key). Startup also throws if the
migrations-history table is left at the provider default (see point 2 above).
Persistence
ConciergeAuthDbContext, schema concierge, three tables — client_credentials,
peer_keypairs, jwks_keys — kept separate because they are three distinct trust systems
(contract §10, assumption #100). The entity configurations under Persistence/Configurations/
are this package's schema definition of record; this package ships the model, not migrations
— generate your own with dotnet ef migrations add per the four steps above. A known-good
Postgres migration reference is included at samples/postgres-initial-migration.cs.txt in this
repo (libs/dotnet/samples/) for consumers who want a starting point.
Complete Postgres example, end to end:
dotnet ef migrations add InitialCreate \
--project YourApp.Infrastructure \
--startup-project YourApp.Api \
--context Concierge.Auth.Client.Persistence.ConciergeAuthDbContext
dotnet ef database update \
--project YourApp.Infrastructure \
--startup-project YourApp.Api \
--context Concierge.Auth.Client.Persistence.ConciergeAuthDbContext
(Your YourApp.Infrastructure project needs its own IDesignTimeDbContextFactory<ConciergeAuthDbContext>,
or an AddDbContext<ConciergeAuthDbContext> registration reachable at design time, that applies
UseNpgsql(...) with MigrationsAssembly("YourApp.Infrastructure") and the MigrationsHistoryTable
call above.)
Encryption
ISecretProtector (AES-256-GCM, fresh 12-byte nonce per call, 16-byte tag). Register via
AddConciergeAuthClient; consumers should never log a Protect/Unprotect input or output.
Caching abstraction
IConciergeCredentialCache (Concierge.Auth.Client.Caching) — a pluggable key/secret cache
consumed by Concierge.Auth.Client.AuthGuard's API-key scheme. This package ships no
implementation, only the interface; the host wires its own (in-memory, Redis, a database, ...),
the same provider-agnosticism this package already applies to EF Core. Register your
implementation against IConciergeCredentialCache directly — there is no Add... helper for it.
Out of scope here
HTTP calls to AuthService, Redis, RabbitMQ, ASP.NET Core middleware — see the extension packages.
| Product | Versions 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. |
-
net10.0
- Microsoft.EntityFrameworkCore (>= 10.0.11)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.11)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Concierge.Auth.Client:
| Package | Downloads |
|---|---|
|
Concierge.Auth.Client.Keys
JWKS signing-key retrieval (human-token verification, public endpoint), peer public-key lookup (service-to-service, credentialed), and own peer-keypair import/store (is_own=true, encrypted at rest) for the THISO Concierge.* client SDK. Two separate, unrelated key systems — kept in separate interfaces, storage, and caches; see contract assumption #100. |
|
|
Concierge.Auth.Client.AuthGuard
ASP.NET Core authentication schemes for AuthService-issued credentials: AddConciergeSessionToken validates opaque session tokens (Redis cache + validate fallback, §11), AddConciergeJwtBearer validates client-credential JWTs (RS256/JWKS, typ guard, jti deny-list, client-revocation epoch), AddConciergePeerSignature validates peer-key RSA request signatures (Redis nonce replay protection), AddConciergeApiKey validates API keys against a host loader, plus WebSocket handshake support. The only Concierge.Auth.Client.* package referencing ASP.NET Core or StackExchange.Redis. |
|
|
Concierge.Auth.Client.Secrets
Self-service credential rotation against AuthService for the THISO Concierge.* client SDK. Persists through Concierge.Auth.Client's client_credentials table. |
|
|
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. |
|
|
Concierge.Auth.Client.Tokens
Obtains typ:"client" JWTs from POST /api/v1/auth/token for the THISO Concierge.* client SDK — in-memory cache, single-flight refresh, and a DelegatingHandler that attaches Authorization: Bearer. Counterpart to Concierge.Auth.Client.AuthGuard's JWT validation lane; authenticates with IClientCredentialStore from Concierge.Auth.Client.Secrets. |
GitHub repositories
This package is not used by any popular GitHub repositories.