Lyo.Authentication.Models
1.0.1
dotnet add package Lyo.Authentication.Models --version 1.0.1
NuGet\Install-Package Lyo.Authentication.Models -Version 1.0.1
<PackageReference Include="Lyo.Authentication.Models" Version="1.0.1" />
<PackageVersion Include="Lyo.Authentication.Models" Version="1.0.1" />
<PackageReference Include="Lyo.Authentication.Models" />
paket add Lyo.Authentication.Models --version 1.0.1
#r "nuget: Lyo.Authentication.Models, 1.0.1"
#:package Lyo.Authentication.Models@1.0.1
#addin nuget:?package=Lyo.Authentication.Models&version=1.0.1
#tool nuget:?package=Lyo.Authentication.Models&version=1.0.1
Lyo.Authentication.Models
Wire-shape data for Lyo.Authentication — the half of the auth stack that's safe to ship to anyone, including Blazor WebAssembly clients. No services, no stores, no key material, no DI; just records, format helpers, and a JWT parser.
Examples
What's in it
Records/
LyoUser, LinkedIdentity # /auth/me payload shapes
IssuedLyoJwt, IssuedApiToken # issuer outputs
ApiTokenRecord, ApiTokenPrincipal, ApiTokenIssueRequest # token-store / issuer shapes
LyoJwtClaims # canonical claim-name constants ("lyo:uid", "lyo:scope", ...)
LyoJwtClaimsParser # parse a JWT payload into IReadOnlyList<Claim>
Format/
Base64Url # RFC 4648 §5, no padding (JWT segments + Format-B secrets)
Base32Crockford # 11-char ids for Format-B tokens
ApiToken # parsed lyo_kind_ring_id_secret record
ApiTokenKind, ApiTokenRing # well-known segment values (pat / svc / cli / live / test / dev / …)
Audit/
AuthAuditEvent, AuthAuditEventKind # closed taxonomy of audit-worthy moments
Scopes/
Scope # single registered authorization scope record
Verifying the boundary
// _ServiceBleedProbe.cs (temporary)
namespace MyApp._Probe;
internal static class ServiceBleedProbe
{
public static object? Bleed() => typeof(Lyo.Authentication.Services.Jwt.Ed25519LyoJwtIssuer);
}
What's in it
The minting/hashing parts of
ApiTokenCodec, everyIApiTokenStore/IUserStore/ILyoJwtIssuer/ILyoJwtValidator, the scope registry runtime, and the audit recorder live inLyo.Authentication— not here. They depend onLyo.KeyStore,Lyo.Hashing, and BouncyCastle, which have no business in a browser bundle.
When to reference it
- A Blazor WebAssembly app that needs to decode a Lyo JWT, render a
LyoUser, or describe an audit event. - A non-Lyo client (e.g. a serverless function, a script, a CLI) that consumes the Lyo API and wants strongly-typed wire shapes without dragging in the server stack.
- A shared library that sits between the API and a consumer — e.g.
Lyo.Authentication.Client,Lyo.Authentication.Web.Components.
When NOT to reference it
- If you are the API/auth-server host, reference
Lyo.Authenticationdirectly. It transitively pulls Models in for you, and you'll need the service interfaces and DI helpers that only live in the server package.
Verifying the boundary
The intent of the split is that consumer-side projects can never accidentally compile against a server-only type. Quick way to assert this in CI for any consumer csproj:
If dotnet build reports CS0234: The type or namespace name 'Services' does not exist in the namespace 'Lyo.Authentication', the boundary holds. Delete the probe.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Common— (direct, lyo)Lyo.Exceptions— (direct, lyo)System.Text.Json10.0.5— (direct, microsoft, netstandard2.0)Microsoft.Extensions.Logging.Abstractions10.0.5— (transitive, microsoft)System.Memory4.6.3— (transitive, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.Common (>= 1.0.1)
- Lyo.Exceptions (>= 1.0.1)
- System.Text.Json (>= 10.0.5)
-
net10.0
- Lyo.Common (>= 1.0.1)
- Lyo.Exceptions (>= 1.0.1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Lyo.Authentication.Models:
| Package | Downloads |
|---|---|
|
Lyo.Authentication
Server-side authentication services for Lyo: Ed25519-signed JWT issuance/validation (`ILyoJwtIssuer`, `Ed25519LyoJwtIssuer`, `JwkSetBuilder`), opaque Format-B token issuance/validation/store (`IApiTokenIssuer`, `IApiTokenStore`, `ApiTokenCodec` minting/hashing), refresh-token exchange, user/external-identity stores, scope registry runtime, and audit recorder plumbing. Pure data shapes (records, claim names, format helpers, audit-event taxonomy, `Scope`) live in `Lyo.Authentication.Models` and are consumer-safe. This package brings in `Lyo.KeyStore`, `Lyo.Hashing`, and BouncyCastle — do not reference it from a Blazor WebAssembly client. |
|
|
Lyo.Authentication.Web.Components
Host-agnostic Razor / MudBlazor pages for Lyo authentication: provider login, JWT debug workbench, and user profile (self + other). Pair with `Lyo.Authentication.Web.Components.Server` (BFF cookie flow) or `Lyo.Authentication.Web.Components.Wasm` (direct token flow). |
|
|
Lyo.Authentication.Client
Consumer-side runtime for Lyo.Authentication. Used by Gateway / web hosts that need to redeem a Lyo handoff code, maintain a server-side session keyed by an HttpOnly cookie, project the signed-in Lyo user into Blazor's AuthenticationStateProvider, and inject a Bearer header on outbound API calls (with automatic refresh on 401). Pairs with the Lyo.Authentication.OpenIdConnect endpoints on the API side. |
GitHub repositories
This package is not used by any popular GitHub repositories.