[Archived] ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
1.97k
stars
871
forks
source link
Question: can return an IIdentityBuilder interface instead of IdentityBuilder class? #2042
i want to use my ApplicationIdentityBuilder class than inherit from IdentityBuilder class
when use services.AddIdentity<TUser,TRole>() it will never return ApplicationIdentityBuilder
because in server.AddIdentity<TUser,TRole>() will return this
in order to use my ApplicationIdentityBuilder so i write an extension method like this
of course it works fine but looks like little strange
in my customer SignInManager like this
i think server.AddIdentity<TUser,TRole>() return an IIdentityBuilder Interface will be better
so if we want use customer IdentityBuilder can like this
and ApplicationIdentityBuilder define can like this
i want to use my ApplicationIdentityBuilder class than inherit from IdentityBuilder class when use services.AddIdentity<TUser,TRole>() it will never return ApplicationIdentityBuilder because in server.AddIdentity<TUser,TRole>() will return this in order to use my ApplicationIdentityBuilder so i write an extension method like this of course it works fine but looks like little strange in my customer SignInManager like this i think server.AddIdentity<TUser,TRole>() return an IIdentityBuilder Interface will be better so if we want use customer IdentityBuilder can like this and ApplicationIdentityBuilder define can like this