djsleurink.IdentityManager
1.0.0
dotnet add package djsleurink.IdentityManager --version 1.0.0
NuGet\Install-Package djsleurink.IdentityManager -Version 1.0.0
<PackageReference Include="djsleurink.IdentityManager" Version="1.0.0" />
paket add djsleurink.IdentityManager --version 1.0.0
#r "nuget: djsleurink.IdentityManager, 1.0.0"
// Install djsleurink.IdentityManager as a Cake Addin #addin nuget:?package=djsleurink.IdentityManager&version=1.0.0 // Install djsleurink.IdentityManager as a Cake Tool #tool nuget:?package=djsleurink.IdentityManager&version=1.0.0
Identity Manager for ASP.NET Core / Blazor Server
Simple yet effective
This package adds basic CRUD actions for Identity Management which can be used during development for ASP.NET Core/Blazor Server projects using the identity framework provided by Microsoft.
It does what it says, with the least setup/hassle possible.
I made it because i needed the functionality for my personal apps. I based it off of Carl Franklin's https://github.com/carlfranklin/IdentityManagerLibrary I Just wanted to make it more reuseable for myself.
Prerequitites
- TargetFramework >= .NET 8.0
- Have identity management setup using Microsoft.AspNetCore.Identity
Setup
- Setting up the IdentityManager
- Adding CRUD pages
1. Setting up the IdentityManager
Do the following in you main ASP.NET Core / Blazor Server project:
- Add the package using NuGet package manager
djsleurink.IdentityManager
or using CLI:dotnet add package djsleurink.IdentityManager
- Register the identity manager:
using IdentityManager;
builder.Services.AddIdentityManager<[your IdentityUser model], [your IdentityRole model]>();
2. Adding CRUD pages
- In App.Razor add the following inside the router tag
AdditionalAssemblies="new[] { typeof(IdentityManager.DependencyInjection).Assembly}"
- In your NavMenu include the following:
<IdentityManagerNavigationLinks></IdentityManagerNavigationLinks>
Done
The CRUD pages can be reached via:
- identitymanager/users
- identitymanager/createuser
- identitymanager/edituser/{id}
- identitymanager/roles
- identitymanager/createrole
A management class will be accessible that you can use, it is registered with the ServiceCollection as the IIdentityManager, this will let you use the CRUD actions in your code directly.
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. |
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.0)
- Microsoft.Extensions.Identity.Core (>= 8.0.0)
- Microsoft.Extensions.Identity.Stores (>= 8.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 |
---|---|---|
1.0.0 | 103 | 2/13/2024 |
Initial release.