Identity.Module.API
2.5.381
dotnet add package Identity.Module.API --version 2.5.381
NuGet\Install-Package Identity.Module.API -Version 2.5.381
<PackageReference Include="Identity.Module.API" Version="2.5.381" />
<PackageVersion Include="Identity.Module.API" Version="2.5.381" />
<PackageReference Include="Identity.Module.API" />
paket add Identity.Module.API --version 2.5.381
#r "nuget: Identity.Module.API, 2.5.381"
#:package Identity.Module.API@2.5.381
#addin nuget:?package=Identity.Module.API&version=2.5.381
#tool nuget:?package=Identity.Module.API&version=2.5.381
.NET Modular Dynamic Identity Manager
A set of libraries to easily integrate and extend authentication in ASP.NET Core projects, using ASP.NET Core Identity.
π·οΈ Introduction
MinimalApi.Identity is a dynamic and modular identity manager for managing users, roles, claims and more for access control in Asp.Net Mvc Core and Web API, using .NET 8 Minimal API, Entity Framework Core and relational database (of your choice).
This library is still under development of new implementations and in the process of creating the related documentation.
π§© Features
- Minimal API: Built using .NET 8 Minimal API for a lightweight and efficient implementation.
- Entity Framework Core: Uses EF Core for data access, making it easy to integrate with your existing database.
- Modular: The library is designed to be modular, allowing you to add or remove features as needed.
- Dynamic: Supports dynamic management of users, roles, claims, forms, licensing and policies.
- Flexible Configuration: Easily configurable via
appsettings.jsonto suit your application's needs. - Outbox Pattern: Implement the transactional outbox pattern for reliable email sending.
π οΈ Installation
Prerequisites
- .NET 8.0 SDK (latest version)
- SQL Server 2022 Express installed (setup for Windows) or in Docker version (example)
As an alternative to SQL Server you can use one of these databases:
- Azure SQL Database (setup guide)
- PostgreSQL - Docker version (example)
- MySQL - Docker version (example)
- SQLite
Setup
The library is available on NuGet, just search for Identity.Module.API in the Package Manager GUI or run the following command in the .NET CLI:
dotnet add package Identity.Module.API
βοΈ Configuration
The configuration can be completely managed by adding this section to the appsettings.json file:
The library is still under development, so the configuration may change in future updates.
A complete example of the configurations in AppSettings.json is available here.
ποΈ Database
Configuration
The library uses Entity Framework Core to manage the database.
The connection string is configured in the AppSettings section of the appsettings.json file, while the database type is configured in the Program.cs class.
After configuring the Program.cs class, modify the connection string for the corresponding database.
Migrations
To update the database schema you need to create migrations, they will be applied automatically at the next application startup.
To create database migrations select MinimalApi.Identity.Core as the default project from the drop-down menu in the Package Manager Console
and run the command: Add-Migration MIGRATION-NAME
Example: Add-Migration InitialMigration -Project MinimalApi.Identity.Migrations.SQLServer
if you use a separate project for migrations (It is recommended to add a reference in the project name to the database used, in this case it is SQL Server),
make sure to set the -Project parameter to the name of that project.
π Swagger / OpenAPI
It is possible to protect access to the Swagger UI with the following configuration in SwaggerSettings:
- RequiredAuth: set via
AuthSettings:IsRequired(supported values:true,false) - Username: set via
AuthSettings:Username - Password: set via
AuthSettings:Password
You can manage the state of the Swagger UI with the following configuration:
- Enable/Disable Swagger UI: set via
SwaggerSettings:IsEnabled(supported values:true,false)
π‘ Usage Examples
The library is still under development, so the Program.cs configuration may change in future updates.
A complete example of the Program.cs class is available here.
π Authentication
The following authentication types are currently supported:
- JWT Bearer Token
π§βπΌ Administrator Account
A default administrator account is created automatically with the following configuration:
- Email: set via
AppSettings:AssignAdminEmail - Username: set via
AppSettings:AssignAdminUsername - Password: set via
AppSettings:AssignAdminPassword
π Badges
πΊοΈ Roadmap
- Migrate solution to .NET 9
- Migrate SwaggerSettings configuration to database
- Migrate SmtpOptions configuration to database
- Replacing the hosted service email sender using Coravel jobs
- Migrate solution to .NET 10
- Replacing exceptions with implementation of operation results
- Add support for multi tenancy
- Align endpoints with the updated version of ASP.NET Core Identity (including endpoints for two-factor authentication and management, downloading and deleting personal data)
- Code Review and Refactoring
- Update documentation
π Future implementations
- Change the entity ID type from INT to GUID
- Make the ID entity type dynamic, so that it can accept both INT and GUID at runtime
- Add authentication support from third-party providers (e.g. Auth0, KeyCloak, GitHub, Azure)
- Migrate FeatureFlagsOptions to Feature Management (package Microsoft.FeatureManagement)
π License
This project is licensed under the MIT License - see the LICENSE file for details.
β Give a Star
Don't forget that if you find this project helpful, please give it a β on GitHub to show your support and help others discover it.
π€ Contributing
The project is constantly evolving. Contributions are always welcome. Feel free to report issues and submit pull requests to the repository, following the steps below:
- Fork the repository
- Create a feature branch (starting from the develop branch)
- Make your changes
- Submit a pull requests (targeting develop)
π Support
If you have any questions or need help, read here to find out what to do.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 was computed. 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. |
-
net8.0
- EntityFrameworkCore.Exceptions.MySQL (>= 8.1.3)
- EntityFrameworkCore.Exceptions.MySQL.Pomelo (>= 8.1.3)
- EntityFrameworkCore.Exceptions.PostgreSQL (>= 8.1.3)
- EntityFrameworkCore.Exceptions.Sqlite (>= 8.1.3)
- EntityFrameworkCore.Exceptions.SqlServer (>= 8.1.3)
- Identity.Module.AccountManager (>= 2.5.77)
- Identity.Module.AuthManager (>= 2.5.66)
- Identity.Module.ClaimsManager (>= 2.5.11)
- Identity.Module.Core (>= 2.5.193)
- Identity.Module.EmailManager (>= 2.5.63)
- Identity.Module.LicenseManager (>= 2.5.75)
- Identity.Module.ModuleManager (>= 2.5.15)
- Identity.Module.PolicyManager (>= 2.5.93)
- Identity.Module.ProfileManager (>= 2.5.85)
- Identity.Module.RolesManager (>= 2.5.43)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.22)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 8.0.22)
- Microsoft.EntityFrameworkCore (>= 9.0.11)
- Microsoft.EntityFrameworkCore.Sqlite (>= 9.0.11)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.11)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 9.0.4)
- Pomelo.EntityFrameworkCore.MySql (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.5.381 | 0 | 1/7/2026 |
| 2.5.377 | 45 | 1/6/2026 |
| 2.5.368 | 46 | 1/6/2026 |
| 2.5.367 | 65 | 1/5/2026 |
| 2.5.365 | 54 | 1/4/2026 |
| 2.5.363 | 53 | 1/4/2026 |
| 2.5.360 | 60 | 1/3/2026 |
| 2.5.357 | 60 | 1/2/2026 |
| 2.5.354 | 79 | 12/31/2025 |
| 2.5.353 | 85 | 12/30/2025 |
| 2.5.349 | 96 | 12/28/2025 |
| 2.5.346 | 95 | 12/28/2025 |
| 2.5.344 | 93 | 12/27/2025 |
| 2.5.343 | 124 | 12/26/2025 |
| 2.5.341 | 178 | 12/25/2025 |
| 2.5.334 | 173 | 12/22/2025 |
| 2.5.332 | 173 | 12/21/2025 |
| 2.5.331 | 140 | 12/20/2025 |
| 2.5.329 | 267 | 12/18/2025 |
| 2.5.327 | 275 | 12/18/2025 |
| 2.5.325 | 268 | 12/17/2025 |
| 2.5.322 | 269 | 12/16/2025 |
| 2.5.318 | 225 | 12/15/2025 |
| 2.5.316 | 150 | 12/13/2025 |
| 2.5.314 | 108 | 12/13/2025 |
| 2.5.313 | 123 | 12/12/2025 |
| 2.5.310 | 416 | 12/11/2025 |
| 2.5.309 | 425 | 12/10/2025 |
| 2.5.308 | 435 | 12/9/2025 |
| 2.5.307 | 425 | 12/8/2025 |
| 2.5.304 | 210 | 12/7/2025 |
| 2.5.266 | 165 | 11/28/2025 |
| 2.5.252 | 192 | 11/24/2025 |
| 2.5.250 | 211 | 11/22/2025 |
| 2.5.249 | 330 | 11/21/2025 |
| 2.5.242 | 403 | 11/19/2025 |
| 2.5.220 | 288 | 11/12/2025 |
| 2.5.218 | 282 | 11/11/2025 |
| 2.5.217 | 238 | 11/10/2025 |
| 2.5.216 | 217 | 11/9/2025 |
| 2.5.215 | 124 | 11/8/2025 |
| 2.5.214 | 197 | 11/5/2025 |
| 2.5.213 | 201 | 11/5/2025 |
| 2.5.212 | 201 | 11/4/2025 |
| 2.5.211 | 203 | 11/3/2025 |
| 2.5.209 | 197 | 11/2/2025 |
| 2.5.208 | 196 | 10/29/2025 |
| 2.5.207 | 197 | 10/28/2025 |
| 2.5.206 | 186 | 10/27/2025 |
| 2.5.204 | 184 | 10/27/2025 |
| 2.5.203 | 162 | 10/24/2025 |
| 2.5.201 | 183 | 10/23/2025 |
| 2.5.200 | 181 | 10/22/2025 |
| 2.5.199 | 180 | 10/20/2025 |
| 2.5.195 | 127 | 10/18/2025 |
| 2.5.193 | 117 | 10/18/2025 |
| 2.5.189 | 135 | 10/17/2025 |
| 2.5.180 | 177 | 10/16/2025 |
| 2.5.179 | 159 | 10/10/2025 |
| 2.5.177 | 193 | 10/8/2025 |
| 2.5.176 | 182 | 10/8/2025 |
| 2.5.175 | 199 | 10/6/2025 |
| 2.5.171 | 185 | 10/4/2025 |
| 2.5.167 | 190 | 9/30/2025 |
| 2.5.164 | 162 | 9/28/2025 |
| 2.5.157 | 291 | 9/23/2025 |
| 2.5.141 | 241 | 9/21/2025 |
| 2.5.139 | 173 | 9/21/2025 |
| 2.5.137 | 207 | 9/20/2025 |
| 2.5.131 | 301 | 9/19/2025 |
| 2.5.123 | 321 | 9/17/2025 |
| 2.5.119 | 316 | 9/16/2025 |
| 2.5.100 | 106 | 9/12/2025 |
| 2.5.99 | 102 | 9/12/2025 |
| 2.5.98 | 142 | 9/12/2025 |
| 2.5.92 | 180 | 9/11/2025 |
| 2.5.79 | 184 | 9/8/2025 |
| 2.5.78 | 160 | 9/6/2025 |
| 2.5.71 | 185 | 9/4/2025 |
| 2.5.64 | 196 | 9/3/2025 |
| 2.5.58 | 232 | 8/27/2025 |
| 2.5.55 | 227 | 8/26/2025 |
| 2.5.54 | 201 | 8/25/2025 |
| 2.5.42 | 176 | 8/21/2025 |
| 2.5.13 | 195 | 8/12/2025 |
| 2.5.9 | 178 | 8/10/2025 |
| 2.0.171 | 143 | 8/9/2025 |
| 2.0.165 | 256 | 8/7/2025 |
| 2.0.156 | 262 | 8/6/2025 |
| 2.0.122 | 91 | 8/2/2025 |
| 2.0.119 | 165 | 7/31/2025 |
| 2.0.100 | 174 | 7/28/2025 |
| 2.0.98 | 368 | 7/25/2025 |
| 2.0.94 | 602 | 7/23/2025 |
| 2.0.67 | 204 | 7/16/2025 |
| 2.0.65 | 185 | 7/14/2025 |
| 2.0.64 | 120 | 7/12/2025 |
| 2.0.49 | 187 | 7/9/2025 |
| 2.0.47 | 301 | 7/7/2025 |
| 2.0.46 | 297 | 7/6/2025 |
| 2.0.36 | 110 | 7/5/2025 |
| 2.0.29 | 154 | 7/4/2025 |