mercredi 29 juillet 2015

How to use existing tables under SqLite with ASP.NET Web API 2 OAuth authentication

I am trying to build a backend API for mobile client using Web API 2. And I have selected the Individual Accounts for Authentication as I have to support both Local login and External Login (Facebook, Google, etc).

I have gone through many articles and videos on configuring for local login but the examples were mostly with Sql Server.

And the identity comes with a set of tables like AspNetUsers, AspNetRoles, etc that needs to be used. However, I have the existing database with different table structure which may not map with these AspNet tables.

Also while reading the articles I noticed that, there is a mapping between

AspNetUsers class - IdentityUser table IdentityRole class - AspnetRoles table, and so on.

I want to understand if the AspNetXXX tables are a must, or can I map these tables to my existing tables along with fields.

How to create new users and query those users from my own custom tables under SQLite?

Please help.

Aucun commentaire:

Enregistrer un commentaire