Toamaisutaa.Core
0.5.0
dotnet add package Toamaisutaa.Core --version 0.5.0
NuGet\Install-Package Toamaisutaa.Core -Version 0.5.0
<PackageReference Include="Toamaisutaa.Core" Version="0.5.0" />
<PackageVersion Include="Toamaisutaa.Core" Version="0.5.0" />
<PackageReference Include="Toamaisutaa.Core" />
paket add Toamaisutaa.Core --version 0.5.0
#r "nuget: Toamaisutaa.Core, 0.5.0"
#:package Toamaisutaa.Core@0.5.0
#addin nuget:?package=Toamaisutaa.Core&version=0.5.0
#tool nuget:?package=Toamaisutaa.Core&version=0.5.0
Toamaisutaa.Core
The logic behind Toamaisutaa, with no ASP.NET Core and
no Entity Framework. It depends on Toamaisutaa.Abstractions and Microsoft.Extensions.* and
nothing else, so it runs in a worker service, a console app or a test without a host.
Most applications do not install this directly - Toamaisutaa.AspNetCore brings it. Install it on
its own when something outside a web request needs to hash a password, verify a TOTP code, or
provision a user from a ClaimsPrincipal.
What is in it
- Password hashing - PBKDF2-HMAC-SHA256 at 600,000 iterations, with an optional pepper and versioned rotation. Hashes are PHC strings naming their own algorithm and parameters, so changing either is a rehash on next sign-in rather than a schema change.
- Sign-in and account flows - lockout, rotating refresh tokens with reuse detection and family revocation, password reset, and the security stamp that ends outstanding sessions.
- TOTP - RFC 6238 with replay protection, recovery codes, and AES-256-GCM encryption of the secret at rest. Composed from base class library primitives; there is no TOTP dependency.
- Provisioning - turning an identity provider's claims into a local user, deciding whether a first sign-in creates or links, and writing only when something actually changed.
Every one of these is registered behind an interface from Toamaisutaa.Abstractions with
TryAdd, so registering your own first replaces the default.
Registration
services.AddToamaisutaaProvisioning(); // claims mapping, provisioning, account linking
services.AddToamaisutaaTokenCleanup(); // periodic sweep of expired tokens and challenges
The password and two-factor services are registered by AddToamaisutaaPasswordLogin and
AddToamaisutaaTwoFactor in Toamaisutaa.AspNetCore, because both need an access token issuer and
endpoints to be useful.
Documentation
Licensed under PolyForm Noncommercial 1.0.0 - free for noncommercial use; commercial use needs a separate licence.
| 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.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Toamaisutaa.Abstractions (>= 0.5.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Toamaisutaa.Core:
| Package | Downloads |
|---|---|
|
Toamaisutaa.EntityFrameworkCore
Entity Framework Core storage for Toamaisutaa: users, external logins, password credentials, refresh tokens and password reset tokens, with public entity configurations you can apply to your own DbContext or a ready-made ToamaisutaaDbContext. |
|
|
Toamaisutaa.OpenIdConnect
OIDC bearer token validation for Toamaisutaa. Adds AddToamaisutaaBearer: provider-agnostic JWT validation driven entirely by the issuer discovery document, a configurable role claim, userinfo claims enrichment for issuers that keep groups out of the access token, and issuance of locally signed access tokens for password login. |
|
|
Toamaisutaa.AspNetCore
ASP.NET Core integration for Toamaisutaa: the authenticated-by-default authorization policy, ICurrentUser, the runtime OIDC configuration endpoint a SPA reads at startup, and the local username and password sign-in endpoints. |
GitHub repositories
This package is not used by any popular GitHub repositories.