Customizing Asp.NET Authentication with Existing WCF Service Backends for User Management

In my workplace, we have many existing applications for which generic WCF services have been built to expose enterprise-level user and role management functionality. For example, to create a new user, our applications simply call the Create method exposed by our UserService.

We are trying to create a new MVC5 web application that needs identity management tools. I found some examples of custom implementation of an ASP.NET Identity Framework that usually overrides IUser

, IUserManager

etc. I also found an implementation for MySQL database instead of SQL server. However, I cannot figure out if it is possible to completely ditch the database part of the framework and pass persistence calls to our services, but still use the methods and facade provided by the framework to manage cookies, Owin integration, etc. Or, the enterprise schema certainly doesn't match the default Framework Identity database schema.

I have looked at a sample Identity from Microsoft that a custom manager implements:

var manager = new ApplicationUserManager(new UserStore<ApplicationUser>(context.Get<ApplicationDbContext>()));

      

For this custom manager the user ApplicationUserManager

is required UserStore<ApplicationUser>

who needs ApplicationDbContext

. Is it possible to pass a service instance instead of a custom UserStore instead of a DbContext. Can UserStore work even without DbContext database dependency?

+3


source to share





All Articles