aspnet / Identity

[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

Closed popolw closed 5 years ago

popolw commented 5 years ago

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 source_code in order to use my ApplicationIdentityBuilder so i write an extension method like this aaa of course it works fine but looks like little strange in my customer SignInManager like this bbb i think server.AddIdentity<TUser,TRole>() return an IIdentityBuilder Interface will be better so if we want use customer IdentityBuilder can like this ccc and ApplicationIdentityBuilder define can like this ddd

popolw commented 5 years ago

can return a IIdentityBuilder Interface from services.AddIdentity<TUser,TRole>() not IdentityBuilder class directly?

blowdart commented 5 years ago

As you can see from the method definitions the answer is no.