Reputation: 6451
I have an Entity Framework model that contains the tables
apsnet_Users
aspnet_Memberships
I want to check for the validation of username, and password in WCF library how to achieve that
Shall I add membership to the app.config
, how to achieve something like that?
Best regards
Upvotes: 0
Views: 792
Reputation: 6451
I failed to use entity framework, and the other algorithms of authontications, so I used Membership with SQL directly , Microsaoft encrypt bu way so hard to retrieve
Upvotes: 0
Reputation: 44366
A basic (but secure) username/password database should have columns something like this:
UserName - Text
PasswordSalt - Binary
PasswordHash - Binary
The user name can be stored as plain text.
The salt is a random string of bytes, preferably at least as long as the hash.
The password hash is the binary hash of the password + salt.
Here is the basic procedure when giving a user a new password. I will use SHA-256 hashing as an example.
Then when a user enters their password when logging in, this is the procedure.
This method of password authentication is the preferred method for high-security applications. It is not slow, nor very hard to implement. The best thing is, you can give the entire password table to anyone you please, and the most they will be able to do is pick a user and start guessing passwords.
Upvotes: 4