Identity.Module.API 2.0.122

There is a newer version of this package available.
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
                    
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="Identity.Module.API" Version="2.0.122" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Identity.Module.API" Version="2.0.122" />
                    
Directory.Packages.props
<PackageReference Include="Identity.Module.API" />
                    
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 Identity.Module.API --version 2.0.122
                    
#r "nuget: Identity.Module.API, 2.0.122"
                    
#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 Identity.Module.API@2.0.122
                    
#: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=Identity.Module.API&version=2.0.122
                    
Install as a Cake Addin
#tool nuget:?package=Identity.Module.API&version=2.0.122
                    
Install as a Cake Tool

.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

🧩 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

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 Nuget Package Nuget

Optional packages:

Package Name Version Downloads
Identity.Module.Licenses Nuget Package Nuget

Dependencies Packages:

Package Name Version Downloads
Identity.Module.AccountManager Coming soon
Identity.Module.ClaimsManager Coming soon
Identity.Module.Core Nuget Package Nuget
Identity.Module.EmailManager Coming soon
Identity.Module.ModuleManager Coming soon
Identity.Module.PolicyManager Nuget Package Nuget
Identity.Module.ProfileManager Coming soon
Identity.Module.RolesManager Coming soon

🏆 Badges

SonarCloud

Quality Gate Status Bugs Code Smells Duplicated Lines (%) Lines of Code

Reliability Rating Security Rating Technical Debt Maintainability Rating Vulnerabilities

📜 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:

  1. Fork the repository
  2. Create a feature branch (starting from the develop branch)
  3. Make your changes
  4. Submit a pull requests (targeting develop)

🆘 Support

If you have any questions or need help, you can add a new thread here.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.394 32 1/9/2026
2.5.391 38 1/9/2026
2.5.390 49 1/9/2026
2.5.384 40 1/8/2026
2.5.381 62 1/7/2026
2.5.377 86 1/6/2026
2.5.368 79 1/6/2026
2.5.367 97 1/5/2026
2.5.365 84 1/4/2026
2.5.363 83 1/4/2026
2.5.360 90 1/3/2026
2.5.357 90 1/2/2026
2.5.354 89 12/31/2025
2.5.353 86 12/30/2025
2.5.349 98 12/28/2025
2.5.346 98 12/28/2025
2.5.344 95 12/27/2025
2.5.343 125 12/26/2025
2.5.341 179 12/25/2025
2.5.334 174 12/22/2025
2.5.332 175 12/21/2025
2.5.331 141 12/20/2025
2.5.329 269 12/18/2025
2.5.327 276 12/18/2025
2.5.325 270 12/17/2025
2.5.322 270 12/16/2025
2.5.318 225 12/15/2025
2.5.316 152 12/13/2025
2.5.314 111 12/13/2025
2.5.313 126 12/12/2025
2.5.310 418 12/11/2025
2.5.309 427 12/10/2025
2.5.308 436 12/9/2025
2.5.307 427 12/8/2025
2.5.304 212 12/7/2025
2.5.266 166 11/28/2025
2.5.252 197 11/24/2025
2.5.250 212 11/22/2025
2.5.249 332 11/21/2025
2.5.242 405 11/19/2025
2.5.220 288 11/12/2025
2.5.218 284 11/11/2025
2.5.217 240 11/10/2025
2.5.216 219 11/9/2025
2.5.215 126 11/8/2025
2.5.214 201 11/5/2025
2.5.213 202 11/5/2025
2.5.212 203 11/4/2025
2.5.211 204 11/3/2025
2.5.209 200 11/2/2025
2.5.208 198 10/29/2025
2.5.207 198 10/28/2025
2.5.206 189 10/27/2025
2.5.204 186 10/27/2025
2.5.203 163 10/24/2025
2.5.201 184 10/23/2025
2.5.200 182 10/22/2025
2.5.199 182 10/20/2025
2.5.195 128 10/18/2025
2.5.193 117 10/18/2025
2.5.189 137 10/17/2025
2.5.180 178 10/16/2025
2.5.179 161 10/10/2025
2.5.177 196 10/8/2025
2.5.176 183 10/8/2025
2.5.175 202 10/6/2025
2.5.171 187 10/4/2025
2.5.167 192 9/30/2025
2.5.164 163 9/28/2025
2.5.157 293 9/23/2025
2.5.141 243 9/21/2025
2.5.139 177 9/21/2025
2.5.137 208 9/20/2025
2.5.131 304 9/19/2025
2.5.123 321 9/17/2025
2.5.119 318 9/16/2025
2.5.100 108 9/12/2025
2.5.99 106 9/12/2025
2.5.98 142 9/12/2025
2.5.92 181 9/11/2025
2.5.79 187 9/8/2025
2.5.78 163 9/6/2025
2.5.71 188 9/4/2025
2.5.64 198 9/3/2025
2.5.58 233 8/27/2025
2.5.55 229 8/26/2025
2.5.54 204 8/25/2025
2.5.42 179 8/21/2025
2.5.13 197 8/12/2025
2.5.9 180 8/10/2025
2.0.171 146 8/9/2025
2.0.165 260 8/7/2025
2.0.156 266 8/6/2025
2.0.122 93 8/2/2025
2.0.119 167 7/31/2025
2.0.100 176 7/28/2025
2.0.98 369 7/25/2025
2.0.94 604 7/23/2025
2.0.67 206 7/16/2025
2.0.65 187 7/14/2025
2.0.64 122 7/12/2025
2.0.49 191 7/9/2025
2.0.47 306 7/7/2025
2.0.46 300 7/6/2025
2.0.36 113 7/5/2025
2.0.29 155 7/4/2025