Identity.Module.API
2.0.122
See the version list below for details.
dotnet add package Identity.Module.API --version 2.0.122
NuGet\Install-Package Identity.Module.API -Version 2.0.122
<PackageReference Include="Identity.Module.API" Version="2.0.122" />
<PackageVersion Include="Identity.Module.API" Version="2.0.122" />
<PackageReference Include="Identity.Module.API" />
paket add Identity.Module.API --version 2.0.122
#r "nuget: Identity.Module.API, 2.0.122"
#:package Identity.Module.API@2.0.122
#addin nuget:?package=Identity.Module.API&version=2.0.122
#tool nuget:?package=Identity.Module.API&version=2.0.122
.NET Modular Dynamic Identity Manager
Modular dynamic identity manager for 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 SQL Server.
This library is still under development of new implementations and in the process of creating the related documentation.
📎 Table of Contents
- Table of Contents
- Features
- Installation
- Configuration
- Usage Example
- API Reference
- ToDo
- Packages
- Badges
- License
- Give a Star
- Contributing
- Support
🧩 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 and policies.
- Flexible Configuration: Easily configurable via
appsettings.json
to suit your application's needs.
🛠️ Installation
Prerequisites
- .NET 8.0 SDK (latest version)
- SQL Server 2022 Express installed (setup for Windows) or in Docker version (example)
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.
{
"JwtOptions": {
"Issuer": "[ISSUER]",
"Audience": "[AUDIENCE]",
"SecurityKey": "[SECURITY-KEY-512-CHAR]",
"AccessTokenExpirationMinutes": 60,
"RefreshTokenExpirationMinutes": 60,
"RequireUniqueEmail": true,
"RequireDigit": true,
"RequiredLength": 8,
"RequireUppercase": true,
"RequireLowercase": true,
"RequireNonAlphanumeric": true,
"RequiredUniqueChars": 4,
"RequireConfirmedEmail": true,
"MaxFailedAccessAttempts": 3,
"AllowedForNewUsers": true,
"DefaultLockoutTimeSpan": "00:05:00"
},
"SmtpOptions": {
"Host": "smtp.example.org",
"Port": 25,
"Security": "StartTls",
"Username": "Username del server SMTP",
"Password": "Password del server SMTP",
"Sender": "MyApplication <noreply@example.org>",
"SaveEmailSent": true
},
"UsersOptions": {
"AssignAdminRoleOnRegistration": "admin@example.org",
"PasswordExpirationDays": 90
},
"ValidationOptions": {
"MinLength": 3,
"MaxLength": 50,
"MinLengthDescription": 5,
"MaxLengthDescription": 100
},
"HostedServiceOptions": {
"IntervalAuthPolicyUpdaterMinutes": 5
},
"ApplicationOptions": {
"MigrationsAssembly": "MinimalApi.Identity.Migrations" //Default for migrations assembly is the project that contains the Program.cs class
},
"ConnectionStrings": {
"DatabaseType": "sqlserver",
"SQLServer": "Data Source=[HOSTNAME];Initial Catalog=[DATABASE];User ID=[USERNAME];Password=[PASSWORD];Encrypt=False"
}
}
For migrations you can use a specific project to add to your solution, then configuring the assembly in ApplicationOptions:MigrationsAssembly, otherwise leave it blank and the assembly containing the Program.cs class will be used.
💡 Usage Examples
The library is still under development, so the Program.cs configuration may change in future updates.
A practical example of Program.cs configuration is available here
📚 API Reference
See the documentation for a list of all available endpoints.
🏗️ ToDo
- Move the configuration of the claims to a dedicated library
- Move the configuration of the module to a dedicated library
- Move the configuration of the profile manager to a dedicated library
- Move the configuration of the roles to a dedicated library
- Add CancellationToken to API endpoints (where necessary)
- Move email sending logic (with improvements) to a hosted service
- Add email sending implementation to AccountQuery class
- Add automatic creation of a default administrator account
- Replacing exceptions with implementation of operation results
- Replacing the hosted service email sender using Coravel jobs
- Replacing the hosted service authorization policy updater using Coravel jobs
- Add support for relational databases other than MS SQLServer (e.g. MySQL and PostgreSQL)
- Add endpoints for two-factor authentication and management
- Add endpoints for downloading and deleting personal data
- Add support for multi tenancy
- Add authentication support from third-party providers (e.g. GitHub, Azure)
📦 Packages
Main packages:
Package Name | Version | Downloads |
---|---|---|
Identity.Module.API |
Optional packages:
Package Name | Version | Downloads |
---|---|---|
Identity.Module.Licenses |
Dependencies Packages:
Package Name | Version | Downloads |
---|---|---|
Identity.Module.AccountManager | Coming soon | |
Identity.Module.ClaimsManager | Coming soon | |
Identity.Module.Core | ||
Identity.Module.EmailManager | Coming soon | |
Identity.Module.ModuleManager | Coming soon | |
Identity.Module.PolicyManager | ||
Identity.Module.ProfileManager | Coming soon | |
Identity.Module.RolesManager | Coming soon |
🏆 Badges
📜 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 useful, put 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, you can add a new thread here.
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
- Identity.Module.Core (>= 1.0.42)
- Identity.Module.PolicyManager (>= 1.0.47)
- MailKit (>= 4.13.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.18)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 8.0.18)
- Microsoft.AspNetCore.OpenApi (>= 8.0.18)
- Microsoft.EntityFrameworkCore (>= 8.0.18)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.18)
- Swashbuckle.AspNetCore (>= 9.0.3)
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.13 | 11 | 8/12/2025 |
2.5.9 | 11 | 8/10/2025 |
2.0.171 | 28 | 8/9/2025 |
2.0.165 | 164 | 8/7/2025 |
2.0.156 | 167 | 8/6/2025 |
2.0.122 | 14 | 8/2/2025 |
2.0.119 | 88 | 7/31/2025 |
2.0.100 | 92 | 7/28/2025 |
2.0.98 | 283 | 7/25/2025 |
2.0.94 | 489 | 7/23/2025 |
2.0.67 | 120 | 7/16/2025 |
2.0.65 | 131 | 7/14/2025 |
2.0.64 | 62 | 7/12/2025 |
2.0.49 | 135 | 7/9/2025 |
2.0.47 | 237 | 7/7/2025 |
2.0.46 | 233 | 7/6/2025 |
2.0.36 | 69 | 7/5/2025 |
2.0.29 | 112 | 7/4/2025 |