Calabonga.AspNetCore.IdentityDebug
1.0.0
dotnet add package Calabonga.AspNetCore.IdentityDebug --version 1.0.0
NuGet\Install-Package Calabonga.AspNetCore.IdentityDebug -Version 1.0.0
<PackageReference Include="Calabonga.AspNetCore.IdentityDebug" Version="1.0.0" />
<PackageVersion Include="Calabonga.AspNetCore.IdentityDebug" Version="1.0.0" />
<PackageReference Include="Calabonga.AspNetCore.IdentityDebug" />
paket add Calabonga.AspNetCore.IdentityDebug --version 1.0.0
#r "nuget: Calabonga.AspNetCore.IdentityDebug, 1.0.0"
#:package Calabonga.AspNetCore.IdentityDebug@1.0.0
#addin nuget:?package=Calabonga.AspNetCore.IdentityDebug&version=1.0.0
#tool nuget:?package=Calabonga.AspNetCore.IdentityDebug&version=1.0.0
Calabonga.AspNetCore.IdentityDebug for ASP.NET Core
Simple but very helpful nuget package Calabonga.AspNetCore.IdentityDebug that's allow you to attach required identity (ClaimIrentity) for View or PageModel debuging.
Why
Sometime authentication server is far away, and you need to design a views for some roles. You may not have an account (login+pass) to view how IO changed. That's why this nuget-package.
v.1.0.0 2025-10-29
- First release.
How to use
Install nuget package
dotnet add package Calabonga.AspNetCore.IdentityDebugCreate a text-file, for example
Administrator.identity. This file contains a claims will loaded when you start debug you application. The content should be like below:{ "items": [ { "key": "givenname", "value": "DEBUG" }, { "key": "surname", "value": "Adminstator" }, { "key": "nameidentifier", "value": "0231bd57-6d45-4086-bc16-99e77978e0f5" }, { "key": "name", "value": "Administrator" }, { "key": "role", "value": "Administrator" }, { "key": "role", "value": "MyService" }, { "key": "role", "value": "Supervisor" }, { "key": "role", "value": "Manager" }, { "key": "role", "value": "Editor" } ] }Replace you real
.AddAuthentication()method with new one from this nuget-package^builder.Services .AddAuthenticationDebug("c:\\Temp\\Administrator.identity") //.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) .AddCookie(options => { options.LoginPath = "/connect/login"; options.LogoutPath = "/connect/logout"; options.ExpireTimeSpan = TimeSpan.FromHours(1); options.SlidingExpiration = false; });Done. When you start your application it load file from the path you set and attach into context user with claims you define in file.
You can use identity-files as you wish. Something like this:
public override void ConfigureServices(WebApplicationBuilder builder) { builder.Services #if ADMINISTRATOR .AddAuthenticationDebug("c:\\Temp\\Administrator.identity") #elif MANAGER .AddAuthenticationDebug("c:\\Temp\\Manager.identity") #elif VIEWER .AddAuthenticationDebug("c:\\Temp\\Viewer.identity") #else .AddAuthentication(options => options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme) #endif .AddCookie(options => { options.LoginPath = "/connect/login"; options.LogoutPath = "/connect/logout"; options.ExpireTimeSpan = TimeSpan.FromHours(1); options.SlidingExpiration = false; }); }In this case you should just select a run configuration for VisualStudio, for example.
Have a nice DEBUG!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.AspNetCore (>= 2.3.0)
- Microsoft.AspNetCore.Authentication (>= 2.3.0)
- Microsoft.AspNetCore.Http (>= 2.3.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 | 666 | 10/29/2025 |
| 1.0.0-beta.1 | 198 | 10/29/2025 |
First release.