Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Identity
Purpose
The Identity feature extends ASP.NET Core Identity with Eltheon specific factories, repositories and middleware. It centralizes role/permission modeling, conversion helpers and DI ready managers so that hosts and plugins can share the same authorization surface without duplicating scaffolding.
Building Blocks
v1/Interfacesdefine repositories (IAuthRepository), managers and permission helpers that wrap the defaultUserManager/RoleManager.v1/Models(AuthRole,RolePermission,Permission) capture role metadata and grant matrices that can be serialized, seeded or exposed via APIs.- Converter and enum types (
PermissionTypeConverter,PermissionType) make it simple to map between persisted values and domain friendly enums. - Middleware and factories (e.g. for claims transformation or sign-in managers) encapsulate the glue needed to hook Identity into the rest of the framework.
Usage
- Register the Identity feature alongside ASP.NET Core Identity in your host:
builder.Services.AddScoped<IAuthRepository, AuthRepository>();
builder.Services.AddScoped<IPermissionManager, PermissionManager>();
- Reference the shared models in Razor pages, controllers or APIs when exposing role/permission settings.
- Use the provided converters when persisting or reading permission values from configuration stores.
Integration Notes
- Depends on the InMemory feature for caching permission lookups.
- Ships as a pure class library; it does not register Identity itself. Continue to call
AddIdentity/AddIdentityCorein your host and then use these abstractions to interact with it. - The package is designed to be consumed by both web hosts and plugins, allowing consistent enforcement of authorization policies.
Diagnostics
Loggers are injected throughout repository and manager classes. Enable the category Redeon.SuperSiteEngineCore.Web.Eltheon.Core.Features.Identity to observe user, role or permission operations during troubleshooting.