I am new to this WebApi stuff so please bear with me..:)
I have a project that allows an android device to connect and view data from an existing sql database.
I created the webapi using visual studio 2015 and it was quite simple (Entity framework automatically created 90% of models and controllers).
Everything is working now except that I really want to secure this webapi. My project was created with the individual user accounts option.
To start with I tried to register an account from the api which created the account in a local db.
I changed the connection string of the DefaultConnection
and pointed it to my existing database.
Then I tried to register a test account again and the asp.net identity tables were created in my database.. so far good
Now my problem is that in my project there will be no register new account from the webapi, all the username and passwords are already stored in the database in a separated table and adding a new account is done from the sql server.
Even if I wanted to copy the existing usernames i can't since the password in the Asp.net identity tables are hashed :/
So I am left with 2 options: 1- find a way to remove the password hashing and copy my usernames and passwords to the asp.net identity (which is something i really don't want to do since hashing is always good )
2- is to find a way to convert my already saved passwords into hashed passwords (this will force the company to manually hash a password each time they have to create a new account).
I am have searched ALOT but every thing I find is either old or for angularjs or web applications which my project is totally different from.
Any step by step or just point me to the right direction will be appreciated.:)