Reputation: 1069
Let's consider that I already have a package that returns UserIdentity
based on HttpRequest
. I want to create an ASP.NET Core project that uses my package in order to get ClaimIdentity object. How it could be done?
Upvotes: 0
Views: 1548
Reputation: 1865
I think you can tell Asp.NET Core to use your custom Identity by applying it on the services middleware registration. Something like
services.AddDefaultIdentity<MyIdentityClass>()
Supposing that MyIdentityClass
extends the IdentityUser
class.
You can find more informations about how to customize the Identity [https://learn.microsoft.com/it-it/aspnet/core/security/authentication/customize-identity-model?view=aspnetcore-3.1](here in the Asp.NET Core documentation)
Upvotes: 2