KamiSama.Modules.Identity.Abstractions
10.0.14
dotnet add package KamiSama.Modules.Identity.Abstractions --version 10.0.14
NuGet\Install-Package KamiSama.Modules.Identity.Abstractions -Version 10.0.14
<PackageReference Include="KamiSama.Modules.Identity.Abstractions" Version="10.0.14" />
<PackageVersion Include="KamiSama.Modules.Identity.Abstractions" Version="10.0.14" />
<PackageReference Include="KamiSama.Modules.Identity.Abstractions" />
paket add KamiSama.Modules.Identity.Abstractions --version 10.0.14
#r "nuget: KamiSama.Modules.Identity.Abstractions, 10.0.14"
#:package KamiSama.Modules.Identity.Abstractions@10.0.14
#addin nuget:?package=KamiSama.Modules.Identity.Abstractions&version=10.0.14
#tool nuget:?package=KamiSama.Modules.Identity.Abstractions&version=10.0.14
KamiSama.Modules.Identity.Abstractions
Version: 10.0.0
Description
Provider-neutral Identity feature contracts, requests, responses, search models, role constants, and failure metadata for login, token refresh, logout, user, role, password, session, and two-factor workflows. Reference this package from callers or alternative implementations that should not depend on ASP.NET Core Identity, Entity Framework Core, or a database provider.
How to use
dotnet add package KamiSama.Modules.Identity.Abstractions --version 10.0.0
Inject only the feature interfaces needed by an application service. The Core package discovers its implementations during module registration, while another provider can implement the same contracts without depending on ASP.NET Core Identity:
using KamiSama.Modules.Identity.Services.AccountSecurity;
using KamiSama.Modules.Identity.Services.Authentication;
using KamiSama.Modules.Identity.Services.Roles;
using KamiSama.Modules.Identity.Services.Users;
public sealed class AccountFacade(
ILogin login,
IRefreshToken refreshToken,
ILogout logout,
IFindCurrentUser currentUser,
IListRoles listRoles,
IListActiveSessions sessions,
IChangePassword changePassword)
{
public Task<LoginResponse> LoginAsync(LoginRequest request, CancellationToken token) => login.LoginAsync(request, token);
public Task<TokenPairDto> RefreshAsync(RefreshTokenRequest request, CancellationToken token) => refreshToken.RefreshAsync(request, token);
public Task LogoutAsync(CancellationToken token) => logout.LogoutAsync(token);
public Task<UserDto> CurrentAsync(CancellationToken token) => currentUser.GetCurrentUserAsync(token);
public Task<IReadOnlyList<ActiveSessionDto>> SessionsAsync(Guid userId, CancellationToken token) => sessions.ListAsync(userId, token);
public Task ChangePasswordAsync(ChangePasswordRequest request, CancellationToken token) => changePassword.ChangeAsync(request, token);
}
These are operation shapes, not an authorization boundary. ILogin accepts one user name or email value and returns both the authenticated user and a new session's tokens; IRefreshToken replaces tokens for the session represented by the supplied pair. ILogout and ILogoutAll rely on an implementation-defined current authenticated context. Implementations must authorize target user and role identifiers, avoid account-enumeration differences, define cancellation and transaction behavior, and protect token and password workflows. DTO arrays are mutable, and the contracts do not promise that search or update fields are honored by every implementation.
Namespaces
- KamiSama.Modules.Identity.DataTypes (1 types)
- KamiSama.Modules.Identity.Exceptions (1 types)
- KamiSama.Modules.Identity.Services.AccountSecurity (11 types)
- KamiSama.Modules.Identity.Services.Authentication (8 types)
- KamiSama.Modules.Identity.Services.Password (5 types)
- KamiSama.Modules.Identity.Services.Roles (12 types)
- KamiSama.Modules.Identity.Services.Users (20 types)
Types
- KamiSama.Modules.Identity.DataTypes.KnownRoles - Defines the canonical
SuperAdmin,Operator, andUserrole-name strings. These constants neither seed roles nor grant authorization. - KamiSama.Modules.Identity.Exceptions.AddUserFailedException - Reports an Identity user-creation failure as HTTP 500 and retains only the first Identity error description as localization metadata.
- KamiSama.Modules.Identity.Services.AccountSecurity.ActiveSessionDto - Describes one active application session for account-security displays and revocation controls. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.ChangePasswordRequest - Supplies current credentials and a replacement password for a password-change workflow. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.IChangePassword - Authenticates current credentials and changes a user's password. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.IGetAuthenticatorSecret - Reads or creates the authenticator secret associated with a user. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.IIsTwoFactorAuthenticationEnabled - Checks whether two-factor authentication is enabled for a user. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.IListActiveSessions - Lists active sessions for a user; implementations define authorization and current-session detection. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.ISetTwoFactorAuthenticationEnabled - Enables or disables two-factor authentication for a user. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.ITerminateAllOtherSessions - Revokes every active session for a user except the implementation-defined current session. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.ITerminateSession - Revokes one session belonging to a user. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.IValidateAuthenticatorCode - Validates a time-based authenticator code for a user. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.AccountSecurity.ValidateAuthenticatorCodeRequest - Supplies a user identifier and time-based authenticator code for validation. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Authentication.ILogin - Defines credential validation and new-session token issuance as one operation. Core accepts a user name or email login, validates password and configured two-factor authentication, persists a revocable session, and returns its user and tokens.
- KamiSama.Modules.Identity.Services.Authentication.ILogout - Defines revocation of the current authenticated application session. Core reads user and session claims from the active HTTP context and marks that session revoked in the Identity database.
- KamiSama.Modules.Identity.Services.Authentication.ILogoutAll - Defines revocation of every application session for the current authenticated user, including the caller's session. Core resolves the user claim from the active HTTP context and persists revocation for all active sessions.
- KamiSama.Modules.Identity.Services.Authentication.IRefreshToken - Defines replacement-token issuance for the session represented by an access/refresh-token pair. Core validates access-token signature and claims, active session state, and the session-scoped refresh token before returning replacements.
- KamiSama.Modules.Identity.Services.Authentication.LoginRequest - Carries one user name or email address, a password, and an optional authenticator code into
ILogin. Using one login value avoids conflicting identity selectors; the implementation defines lookup and normalization behavior. - KamiSama.Modules.Identity.Services.Authentication.LoginResponse - Returns the provider-neutral authenticated user together with the token pair issued for a newly created session. Callers can establish identity state without invoking a separate public token-issuance service.
- KamiSama.Modules.Identity.Services.Authentication.RefreshTokenRequest - Carries the access and refresh tokens that identify and prove authority over an existing session. Implementations validate the pair before issuing replacements.
- KamiSama.Modules.Identity.Services.Authentication.TokenPairDto - Carries access and refresh tokens for one session plus the access token's absolute UTC expiration. Clients can schedule renewal without decoding provider-specific token contents.
- KamiSama.Modules.Identity.Services.Password.IResetPassword - Resets a user's password according to implementation-defined identity lookup and token validation rules. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Password.IValidatePassword - Validates a candidate password against an implementation's configured password policy. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Password.PasswordValidationError - Describes one password-policy validation failure. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Password.ResetPasswordRequest - Supplies an identity lookup value and replacement password to a reset implementation. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Password.ValidatePasswordRequest - Supplies optional identity context and a candidate password for policy validation. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Roles.AddRoleRequest - Contains the name required to create a role. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Roles.IAddRole - Creates a role and returns its provider-neutral representation. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Roles.IDeleteRole - Deletes the role identified by a
Guid. Use it with the surrounding package APIs when composing application code. - KamiSama.Modules.Identity.Services.Roles.IExistsRoleById - Checks whether a role exists for a
Guididentifier. Use it with the surrounding package APIs when composing application code. - KamiSama.Modules.Identity.Services.Roles.IExistsRoleByName - Checks whether a role exists for a name. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Roles.IFindRoleById - Finds a role by its
Guididentifier. Use it with the surrounding package APIs when composing application code. - KamiSama.Modules.Identity.Services.Roles.IFindRoleByName - Defines the contract for
IFindRoleByNamebehavior. Implement this interface when you need to plug your own code into the surrounding KamiSama package. - KamiSama.Modules.Identity.Services.Roles.IListRoles - Lists roles through the standard paged feature contract. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Roles.IUpdateRole - Updates the role identified by a
Guid. Use it with the surrounding package APIs when composing application code. - KamiSama.Modules.Identity.Services.Roles.RoleDto - Transfers a role identifier and display name without exposing a provider entity. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Roles.RoleSearchModel - Describes paging, name filtering, and ordering requested when roles are listed. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Roles.UpdateRoleRequest - Contains the replacement name for an existing role. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.AddUserRequest - Contains identity, credential, activation, and role values requested when a user is created. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.Enable2faRequest - Supplies a user and verification code when enabling two-factor authentication. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IAddUser - Creates a user through the standard add-feature contract. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IDeleteUser - Deletes the user identified by a
Guid. Use it with the surrounding package APIs when composing application code. - KamiSama.Modules.Identity.Services.Users.IDisable2fa - Disables two-factor authentication for a user. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IDisableUser - Disables a user's ability to authenticate according to implementation-defined lockout semantics. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IEnable2fa - Enables two-factor authentication after validating an authenticator code. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IEnableUser - Enables a user according to implementation-defined lockout semantics. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IExistsUserByEmail - Checks whether a user exists for an email address. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IExistsUserById - Checks whether a user exists for a
Guididentifier. Use it with the surrounding package APIs when composing application code. - KamiSama.Modules.Identity.Services.Users.IExistsUserByName - Checks whether a user exists for a user name. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IFindCurrentUser - Resolves the user represented by the current execution context. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IFindUserByEmail - Finds a user by email address. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IFindUserById - Finds a user by a
Guididentifier. Use it with the surrounding package APIs when composing application code. - KamiSama.Modules.Identity.Services.Users.IFindUserByName - Finds a user by user name. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IListUsers - Lists users through the standard paged feature contract. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.IUpdateUser - Updates the user identified by a
Guid. Use it with the surrounding package APIs when composing application code. - KamiSama.Modules.Identity.Services.Users.UpdateUserRequest - Contains replacement profile and role values requested for an existing user. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.UserDto - Transfers a user's identity, role names, and effective enabled state without exposing a provider entity. Use it with the surrounding package APIs when composing application code.
- KamiSama.Modules.Identity.Services.Users.UserSearchModel - Describes paging, identity text, role, and ordering criteria requested when users are listed. Use it with the surrounding package APIs when composing application code.
| 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
- KamiSama.Chassis.Commons.Abstractions (>= 10.0.14)
- KamiSama.Chassis.HttpExceptions (>= 10.0.14)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on KamiSama.Modules.Identity.Abstractions:
| Package | Downloads |
|---|---|
|
KamiSama.Modules.Identity.Core
ASP.NET Core Identity implementation for KamiSama login, token refresh, logout, user, role, password, two-factor, and session feature contracts, with revocable JWT sessions, EF Core persistence, mappings, and modular startup registration. Install it with exactly one Identity database provider and review the documented security and runtime limitations before exposing its features. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.14 | 50 | 11/8/2026 |
| 10.0.13.1 | 134 | 10/22/2026 |
| 10.0.13 | 122 | 10/22/2026 |
| 10.0.11.9 | 180 | 8/24/2026 |
| 10.0.11.8 | 153 | 8/22/2026 |
| 10.0.11.7 | 182 | 8/21/2026 |
| 10.0.11.6 | 170 | 8/19/2026 |
| 10.0.11.5 | 152 | 8/18/2026 |
| 10.0.11.4 | 159 | 8/18/2026 |
| 10.0.11.3 | 144 | 8/18/2026 |
| 10.0.11.2 | 148 | 8/18/2026 |
| 10.0.11.1 | 161 | 8/15/2026 |
| 10.0.11 | 163 | 8/11/2026 |
| 10.0.10.2 | 163 | 8/4/2026 |