Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Custome SignInManager with Version=3.0.0.0 Microsoft.AspNet.Identity

$
0
0

I just started to learning ASP.net 5 or you can say ASP.NET Core 1.0. Whenever I create project from existing Visual Studio 2015 template, its come with existing User Authentication code which is implemented with the help of Entity Framework. But I am not used to Entity Framework more so, I try to implement it with custom SignInManager.But I found that If I want to implement it, I will have to implement allInterfaces exists in UserManager class and need to register as service into startup.cs.

public class AspUserManager : UserManager<ApplicationUser>
{
public AspUserManager(IUserStore<ApplicationUser> store,
IOptions<IdentityOptions> optionsAccessor,
IPasswordHasher<ApplicationUser> passwordHasher,
IEnumerable<IUserValidator<ApplicationUser>> userValidators,
IEnumerable<IPasswordValidator<ApplicationUser>> passwordValidators,
ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors,
IServiceProvider services,
ILogger<UserManager<ApplicationUser>> logger,
IHttpContextAccessor contextAccessor):
base(store, optionsAccessor, passwordHasher, userValidators, passwordValidators, keyNormalizer, errors, services, logger, contextAccessor)
{ }
}

Is this only way to implement custom SignInManager without Entity Framework or we can implement it with another way.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>