简体   繁体   中英

asp.net core 2 Identity custom storage provider with default stores

I have a question concerning asp.net core Identity (2.1) and the custom storage provider.

In the doc there is the following ( https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-custom-storage-providers?view=aspnetcore-2.2 ) :

To create a custom storage provider, create the data source, the data access layer, and the store classes that interact with this data access layer (the green and grey boxes in the diagram above). You don't need to customize the managers or your app code that interacts with them (the blue boxes above).

So with a custom implementation of UserStore it's work great, but I was asking myself is there is a way to only create the custom Data Access Layer and keep the Microsoft's implementation of the stores?

I can't find a way to do it, so any help will be welcome

Thanks

Nope. The stores are essentially the repositories utilized by Identity. In other words, they are the data access layer. Your implementations of IUserStore , IRoleStore , etc. are what give Identity the ability to retrieve stuff from your custom data store.

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