Toamaisutaa.Abstractions 0.5.0

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

Toamaisutaa.Abstractions

The contracts for Toamaisutaa, an authentication package for ASP.NET Core. Interfaces, options, DTOs and entities - no implementation and no dependencies of any kind, not even Microsoft.Extensions.*.

That is the whole point of it. Two kinds of project should install this one directly:

  • A domain or application layer that wants to know who the caller is. Depend on ICurrentUser here and you get the subject and the display name without ASP.NET Core, Entity Framework, or a JWT library arriving in your domain project.
  • Anything replacing a piece of Toamaisutaa. Every seam in the package is an interface declared here, so a custom store, hasher or claims mapper compiles against this alone.

Everyone else gets it transitively and never has to think about it.

What is in it

Where the caller comes from

Type Is
ICurrentUser The subject and name from the token, and the local user row if you provision one
IUserStore, IExternalLoginStore Reading and writing users and their identity-provider links
IClaimsProfileMapper Turning a ClaimsPrincipal into a profile, for issuers that name things unusually
IProvisioningPolicy Whether a first sign-in creates a user, links to an existing one, or is refused

Local password login

Type Is
IPasswordSignInService Sign in, refresh, sign out, and finish a two-factor challenge
IPasswordAccountService Register, set or change a password, request and complete a reset
IPasswordHasher Hashing and verification. Replace it to use Argon2 or anything else
IPasswordValidator What counts as an acceptable password
IPasswordResetNotifier You must implement this. The package deliberately ships no way to send mail
IAccessTokenIssuer Minting the access token a local sign-in returns
IUserRoleProvider Where roles come from for a locally issued token

Two-factor authentication

Type Is
ITwoFactorService Enrolment, confirmation, disabling, recovery codes
ITotpProvider, IRecoveryCodeProvider Code generation and verification
ISecretProtector Encrypting the TOTP secret at rest. Replace it to keep the key in a vault or an HSM

Entities, as plain classes with no attributes and no navigation properties, so the storage layer is free to map them however a given database needs: ToamaisutaaUser, ToamaisutaaExternalLogin, ToamaisutaaPasswordCredential, ToamaisutaaRefreshToken, ToamaisutaaPasswordResetToken, ToamaisutaaUserTwoFactor, ToamaisutaaRecoveryCode, ToamaisutaaTwoFactorChallenge.

Options, one class per configuration section: ToamaisutaaOidcOptions (Oidc), ToamaisutaaLocalLoginOptions (LocalLogin), ToamaisutaaTwoFactorOptions (TwoFactor), ToamaisutaaProvisioningOptions and ToamaisutaaAuthorizationOptions.

Stability

Pre-1.0, so these interfaces still move - the store interfaces most of all. Breaking changes are listed in the release notes and the PR is labelled, but if you implement one of these yourself, pin the version and read the notes before upgrading.

Documentation

docs.toamaisutaa.pianonic.ch

Licensed under PolyForm Noncommercial 1.0.0 - free for noncommercial use; commercial use needs a separate licence.

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.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Toamaisutaa.Abstractions:

Package Downloads
Toamaisutaa.Core

Provider-agnostic authentication logic for Toamaisutaa: claims mapping, the user provisioning and account-linking rules, password hashing and verification, lockout, and secure token generation. No ASP.NET and no Entity Framework, so it runs in a worker service or a console app.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.0 52 8/12/2026
0.4.0 54 8/12/2026
0.3.0 63 8/11/2026
0.2.0 59 8/11/2026
0.1.0 52 8/11/2026