简体   繁体   中英

Custom AspNet.Identity UserStore

I am implementing my own custom UserStore for web api. I would like to know where I can find the source code for AspNet.Identity's UserStore because I don't intend on changing it completely but I mean to introduce additional behavior that is related to my problem space.

Here is the source code for the interface and the class from the asp.net core on GitHub

Interface:

https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNetCore.Identity/IUserStore.cs

Class: https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNet.Identity.AspNetCoreCompat/UserStore.cs

I am not sure you will find a documentation for it, but it is not hard to understand. You can always ask for an explanation here on Stackoverflow.

You can also look at this question for a stackoverflow member who is doing something like what you are doing now. MVC 5 Custom UserStore

You can find the identity architecture Here

You can customize stores if you are planning to change the way of data accessing. For example you don't want to use default EF and would like to control your own way to access data from AspNetUser table. You can implement only those interfaces that you are using. Options are Here

But if you are planning to update some logic during the Login, you should customize Identity Manager. You will need to implement Custom SignInManager for that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM