djsleurink.IdentityManager 1.0.0

dotnet add package djsleurink.IdentityManager --version 1.0.0
NuGet\Install-Package djsleurink.IdentityManager -Version 1.0.0
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="djsleurink.IdentityManager" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add djsleurink.IdentityManager --version 1.0.0
#r "nuget: djsleurink.IdentityManager, 1.0.0"
#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.
// 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

  1. Setting up the IdentityManager
  2. 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 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. 
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
1.0.0 95 2/13/2024

Initial release.