I’m using default asp.net mvc 4 membership system. User sends his username and password over ASP.NET Web API in plain text.
So I have his plain password, How to compare it with stored hashed password?
Is there a function takes a string and compares it with hashed one?
You have to make sure that your web.config is properly setup to use membership. http://msdn.microsoft.com/en-us/library/6e9y4s5t%28v=vs.100%29.aspx
Also, I make sure to create a MachineKey in your web.config as well. http://msdn.microsoft.com/en-us/library/ff649308.aspx
The code that you would put in your controller would be similar to:
With your model being similar to: